Professional Documents
Culture Documents
M. B. Patil
www.ee.iitb.ac.in/~sequel
Department of Electrical Engineering
Indian Institute of Technology Bombay
Outline
Circuit simulation
* DC analysis
* transient (time-domain) analysis
* AC (frequency-domain) analysis
* logic-level simulation
* mixed-signal simulation
* noise computation
* periodic steady state computation
* sensitivity analysis
R1
is
Vs
R2
Example 1
M. B. Patil, IIT Bombay
R1
is
Vs
R2
Example 1
M. B. Patil, IIT Bombay
R3
R1
is
Vs
R2
R4
Example 1
M. B. Patil, IIT Bombay
R3
R5
R1
is
Vs
R2
R4
Example 1
M. B. Patil, IIT Bombay
R3
R5
R1
is
Vs
R6
R2
R4
Example 1
M. B. Patil, IIT Bombay
R3
R1
VC1
Vs (t)
Example 2
M. B. Patil, IIT Bombay
C1
R1
VC1
Vs (t)
Example 2
M. B. Patil, IIT Bombay
C1
R1
R2
VC1
Vs (t)
Example 2
M. B. Patil, IIT Bombay
C1
C2
R3
R1
R2
VC1
Vs (t)
Example 2
M. B. Patil, IIT Bombay
C1
C2
Outline
R1
R2
I0
e2
v3
R3
k v3
0
R4
e3
SPICE file
I0 1 0 1m
R1 1 2 1k
R2 2 0 1.2k
R3 2 3 200
R4 0 3 1k
VCCS1 1 3 2 3 0.5m
e1
R1
R2
I0
e2
v3
R3
k v3
0
R4
e3
SPICE file
I0 1 0 1m
R1 1 2 1k
R2 2 0 1.2k
R3 2 3 200
R4 0 3 1k
VCCS1 1 3 2 3 0.5m
e1
R1
R2
I0
e2
v3
R3
k v3
0
R4
e3
SPICE file
I0 1 0 1m
R1 1 2 1k
R2 2 0 1.2k
R3 2 3 200
R4 0 3 1k
VCCS1 1 3 2 3 0.5m
e1
R1
R2
I0
e2
v3
R3
k v3
0
R4
e3
SPICE file
I0 1 0 1m
R1 1 2 1k
R2 2 0 1.2k
R3 2 3 200
R4 0 3 1k
VCCS1 1 3 2 3 0.5m
e1
R1
R2
I0
e2
v3
R3
k v3
0
R4
e3
SPICE file
I0 1 0 1m
R1 1 2 1k
R2 2 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
v5
I0
R1
V1
KCL
v1
1 1
1 1
1 1
1
1 1
0
R1
R2
R3
i1
i1
i2
0
i3
i4
i5
1
1
i6
1 1
1
v1
1 1
1
1 1 v2
1
1 v3
1
v4
1
1
v5
1
v6
1
V1
1
0
V2
1
V3
V4
1
I0
V0
v3
V2
STA
example
R2
i2
v2
i3
R3
i6
v6
v
4
v4
V3
V0
V4
i4
i5
v5
I0
R1
V1
v1
KCL
1 1
1 1
1 1
1
1 1
Branch Voltage
Definition
0
R1
R2
R3
i1
i1
i2
0
i3
i4
i5
1
1
i6
1 1
1
v1
1 1
1
1 1 v2
1
1 v3
1
v4
1
1
v5
1
v6
1
V1
1
0
V2
1
V3
V4
1
I0
V0
v3
V2
STA
example
R2
i2
v2
i3
R3
i6
v6
v
4
v4
V3
V0
V4
i4
i5
v5
I0
R1
V1
v1
KCL
1 1
1 1
1 1
1
1 1
Branch Voltage
Definition
0
R1
Branch
Equations
R2
R3
i1
i1
i2
0
i3
i4
i5
1
1
i6
1 1
1
v1
1 1
1
1 1 v2
1
1 v3
1
v4
1
1
v5
1
v6
1
V1
1
0
V2
1
V3
V4
1
I0
V0
Outline
Vs
+
0
V2
+
V0
R
D
Vs
+
0
V2
+
V0
R
D
V0 V2
R
Vs
+
0
V2
+
V0
R
D
V0 V2
R
V0 V2
R
Vs
V2
+
V0
V0 V2
R
V0 V2
R
f (x0 )
f 0 (x0 )
800
f (x)
600
400
200
0
2
3
5
10
x (i)
f (x (i) )
x (i)
0.800000101
0.352103
-0.204101
0.595349101
0.919102
-0.106101
0.488846101
0.190102
-0.368
-0.470101
0.45199210
0.19410
0.44728810
0.29810
-0.746103
0.447214101
0.748105
-0.187106
0.447214101
0.4701012
-0.1171013
f (x)
.
f 0 (x)
(1)
f (x)
.
f 0 (x)
(1)
(2)
f (x)
.
f 0 (x)
(1)
(2)
g 00 ()
(x r )2 ,
2
(3)
f (x)
.
f 0 (x)
(1)
(2)
g 00 ()
(x r )2 ,
2
(3)
(4)
g 00 ()
(x r )2 .
2
(5)
g 00 ()
(x r )2 .
2
Replace x by x (n) and use the fact that g (x (n) ) is the same as x (n+1) in the N-R
procedure, to get
2
g 00 () (n)
x (n+1) r =
x r
.
2
(5)
(6)
g 00 ()
(x r )2 .
2
(5)
Replace x by x (n) and use the fact that g (x (n) ) is the same as x (n+1) in the N-R
procedure, to get
2
g 00 () (n)
x (n+1) r =
x r
.
(6)
2
As x (n) converges to r , so does ; and we can replace g 00 () by g 00 (r ), a constant.
Further, if we define (n) x (n) r (the error at the nth N-R iteration), we can
write Eq. 6 as
(n+1) = k [(n) ]2 ,
(7)
where k = g 00 (r )/2. Eq. 7 describes the well-known feature of quadratic
convergence of the N-R method, i.e., the error goes down quadratically as x (n) r .
2
10
2
3
15
3
20
log [ (n+1) ]
25
4
5
6
7
8
NR iterations
Fixedpoint iterations
9
5
10
5
log [
(n)
log ((n+1) ) versus log ((n) ) with the N-R scheme and the fixed-point iteration method for
f (x) = x 2 6x + 8 = 0, with x = 0 as the initial guess. The green line represents
g 00 (r ) (n) 2
(n+1) =
( ) . The iteration numbers are also shown for each scheme. Note the quadratic
2
convergence of the N-R method. (Both schemes were found to converge to r = 2 for the specified
initial guess.)
M. B. Patil, IIT Bombay
f1 (x)
f2 (x)
f=
.. ,
fN (x)
f1 (x1 , x2 , . . , xN ) = 0 ,
f2 (x1 , x2 , . . , xN ) = 0 ,
....
fN (x1 , x2 , . . , xN ) = 0 .
The correction vector x can be obtained
by solving
(i)
(i)
= f
(i)
f1
x1
f2
1
J=
x
..
fN
x1
f1
x2
f2
x2
..
fN
x2
..
..
..
..
f1
xN
f2
xN
.
fN
xN
(i)
(i)
(i)
(i)
x1
x2
|| f ||2
x1
x2
0.40000101
0.15000102
0.10241102
0.73776 101
0.16223 101
0.25244101
0.14675102
0.78909101
0.34368 101
0.37631 101
0.18371101
0.13922102
0.61523101
0.17887 101
0.39712 101
0.14793101
0.13128102
0.48512101
0.10737 101
0.35342 101
0.70747
0.29789 101
0.49427
6
7
8
9
10
0.1264610
0.1123110
0.62883
0.70976
0.71263
0.71263
0.1242110
0.1182610
0.9371110
0.9290210
0.9287310
0.9287310
0.3848110
0.3062010
0.95091
0.24548 101
1
0.80932 101
0.28690 102
0.35381 105
11
0.53753 1011
0.8093210
1
0.3148710
0.3873510
10
0.5885510
0.2869010
0.3538110
0.5375910
1
3
14
4
5
12
6
4.0
3.0
5.0
6.0
7.0
2.0
x2
8.0
9.0
1.0
10
10.0
11.0
8
12.0
13.0
6
14.0
0
0.5
1.5
2.5
3.5
x1
f(x)
0.5
P
0
0.5
2
1
4
1.5
10
10
20
30
40
Instead of
x (n+1) = x (n) + x (n) ,
as in the standard N-R algorithm, we use
x (n+1)
=
=
x (n) + k x (n)
n
o
x (n) + k [f 0 (x (n) )]1 f (x (n) ) ,
1.5
1
f(x)
0.5
0
0.5
2
1
1.5
2
1.5
0.5
0.5
1.5
10
|f|
k=0.5
6
10
k=0.8
k=0.2
(first 3 iterations)
10
10
14
10
12
16
20
Iteration Number
Application of the N-R method to f (x) = tan1 x = 0, with x = 1.5 as the initial guess and
f
different damping factors. (For the case with no damping, N-R iterations stopped due to
x
becoming too small.)
f1 (x1 , x2 )
k (x1 + x2 6 3) = 0 ,
f2 (x1 , x2 )
10x12 x22 + 45 = 0 .
(8)
k (x1 + x2 6 3) = 0 ,
f2 (x1 , x2 )
10x12 x22 + 45 = 0 .
1010
1010
Single Precision
Double Precision
10 5
100
k=105
10
k=1
10
|| f || 2
|| f || 2
10 5
100
5
10
k=105
10
10
15
(8)
10
(a)
15
10
k=1
(b)
10
1
5 6 7 8 9 10 11 12
Iteration Number
5 6 7 8 9 10 11 12
Iteration Number
|| f || 2 versus N-R iteration number for Eq. 8, with x1 = x2 = 1 as the initial guess, (a) Single
precision arithmetic, (b) Double precision arithmetic.
k (x1 + x2 6 3) = 0 ,
f2 (x1 , x2 )
10x12 x22 + 45 = 0 .
1010
1010
Single Precision
Double Precision
10 5
100
k=105
10
k=1
10
|| f || 2
|| f || 2
10 5
100
5
10
k=105
10
10
15
(8)
10
(a)
15
10
k=1
(b)
10
1
5 6 7 8 9 10 11 12
Iteration Number
5 6 7 8 9 10 11 12
Iteration Number
|| f || 2 versus N-R iteration number for Eq. 8, with x1 = x2 = 1 as the initial guess, (a) Single
precision arithmetic, (b) Double precision arithmetic.
k (x1 + x2 6 3) = 0 ,
f2 (x1 , x2 )
10x12 x22 + 45 = 0 .
1010
1010
Single Precision
Double Precision
10 5
100
k=105
10
k=1
10
|| f || 2
|| f || 2
10 5
100
5
10
k=105
10
10
15
(8)
10
(a)
15
10
k=1
(b)
10
1
5 6 7 8 9 10 11 12
Iteration Number
5 6 7 8 9 10 11 12
Iteration Number
|| f || 2 versus N-R iteration number for Eq. 8, with x1 = x2 = 1 as the initial guess, (a) Single
precision arithmetic, (b) Double precision arithmetic.
MNA equations:
e1
e2
i1
Vs
+
V0
iD
i1 + G (e1 e2 )
0,
G (e2 e1 ) + iD (e2 )
0,
e1
V0 ,
where
0
* The circuit equations can be assembled using the MNA or STA approach.
MNA equations:
e1
e2
i1
Vs
+
V0
iD
i1 + G (e1 e2 )
0,
G (e2 e1 ) + iD (e2 )
0,
e1
V0 ,
where
0
* The circuit equations can be assembled using the MNA or STA approach.
* Since the equations are non-linear, the N-R method is used to solve them.
MNA equations:
e1
e2
i1
Vs
+
V0
iD
i1 + G (e1 e2 )
0,
G (e2 e1 ) + iD (e2 )
0,
e1
V0 ,
where
0
* The circuit equations can be assembled using the MNA or STA approach.
* Since the equations are non-linear, the N-R method is used to solve them.
* More expensive than a linear circuit of the same size, since several
(typically 3 to 5) N-R iterations are involved, each requiring the solution
of Jx = f.
Outline
Vs (t)
(a)
Vs (t)
(c)
Vs (t)
(b)
Vs (t)
(d)
Vs (t)
(a)
Vs (t)
(c)
Vs (t)
(b)
Vs (t)
(d)
* In (a) and (b), we can use the techniques seen earlier. At a given time t,
we simply need to replace the source with a DC source with voltage =
Vs (t).
Vs (t)
(a)
Vs (t)
(c)
Vs (t)
(b)
Vs (t)
(d)
* In (a) and (b), we can use the techniques seen earlier. At a given time t,
we simply need to replace the source with a DC source with voltage =
Vs (t).
* In (c) and (d), the situation is very different due to the presence of a
capacitor which involves time derivatives.
M. B. Patil, IIT Bombay
Transient analysis
b
R
iC
vC
0
dvC
* The capacitor current, iC = C
, cannot be written in terms of the
dt
instantaneous node voltages or branch voltages since its value depends on
the past behaviour of vC .
Transient analysis
b
R
iC
vC
0
dvC
* The capacitor current, iC = C
, cannot be written in terms of the
dt
instantaneous node voltages or branch voltages since its value depends on
the past behaviour of vC .
* We need some way of approximating the derivative in terms of the past
behaviour of vC .
Discretization of time
t1 t2
t3
t N1
......
t0
t begin
t1
t2
t3
t N1 t N
time
t end
Discretization of time
t1 t2
t3
t N1
......
t0
t1
t2
t3
t begin
t N1 t N
time
t end
Discretization of time
t1 t2
t3
t N1
......
t0
t1
t2
t3
t begin
t N1 t N
time
t end
Discretization of time
R
C
Vs
10
10
6
4
V (Volts)
10
V (Volts)
V (Volts)
6
4
2
10
15
Time (sec)
20
(b)
25
4
2
(a)
0
10
15
Time (sec)
20
(c)
25
10
15
Time (sec)
20
25
Discretization of time
R
C
Vs
10
10
6
4
V (Volts)
10
V (Volts)
V (Volts)
6
4
2
10
15
Time (sec)
20
4
2
(a)
0
(b)
25
10
15
Time (sec)
20
(c)
25
10
15
Time (sec)
20
25
Discretization of time
R
C
Vs
10
10
6
4
V (Volts)
10
V (Volts)
V (Volts)
6
4
2
10
15
Time (sec)
20
4
2
(a)
0
(b)
25
10
15
Time (sec)
20
(c)
25
10
15
Time (sec)
20
25
x n+1
xn
tn
t n+1
dx
= f (t, x)
dt
Method
Approximation for
Forward Euler
xn+1 xn
= f (tn , xn )
h
x n+1
xn
tn
Method
Forward Euler
Backward Euler
t n+1
Approximation for
dx
= f (t, x)
dt
xn+1 xn
= f (tn , xn )
h
xn+1 xn
= f (tn+1 , xn+1 )
h
x n+1
xn
tn
Method
Forward Euler
Backward Euler
Trapezoidal
t n+1
Approximation for
dx
= f (t, x)
dt
xn+1 xn
= f (tn , xn )
h
xn+1 xn
= f (tn+1 , xn+1 )
h
1
xn+1 xn
= [f (tn , xn ) + f (tn+1 , xn+1 )]
h
2
FE :
BE :
TRZ :
xn+1 xn
=
h
xn+1 xn
=
h
xn+1 xn
=
h
f (tn , xn )
= xn
f (tn+1 , xn+1 )
= xn+1
1
[f (tn , xn ) + f (tn+1 , xn+1 )]
2
1
= (xn + xn+1 )
2
FE :
xn+1 =
xn (1 h)
BE :
xn+1 =
xn
1
1+h
TRZ :
xn+1 =
xn
1 h/2
1 + h/2
d x
+ = xn + h(e tn ) + = xn (1 h + h2 /2 h3 /6 + ) .
dt
d x
+ = xn + h(e tn ) + = xn (1 h + h2 /2 h3 /6 + ) .
dt
Compare with
FE :
xn+1 =
xn (1 h)
d x
+ = xn + h(e tn ) + = xn (1 h + h2 /2 h3 /6 + ) .
dt
Compare with
FE :
xn+1 =
xn (1 h)
BE :
xn+1 =
xn
1
= xn (1 h + h2 + )
1+h
d x
+ = xn + h(e tn ) + = xn (1 h + h2 /2 h3 /6 + ) .
dt
Compare with
FE :
xn+1 =
xn (1 h)
BE :
xn+1 =
xn
1
= xn (1 h + h2 + )
1+h
TRZ :
xn+1 =
xn
1 h/2
= xn (1 h + h2 /2 h3 /4 + )
1 + h/2
d x
+ = xn + h(e tn ) + = xn (1 h + h2 /2 h3 /6 + ) .
dt
Compare with
FE :
xn+1 =
xn (1 h)
BE :
xn+1 =
xn
1
= xn (1 h + h2 + )
1+h
TRZ :
xn+1 =
xn
1 h/2
= xn (1 h + h2 /2 h3 /4 + )
1 + h/2
d x
+ = xn + h(e tn ) + = xn (1 h + h2 /2 h3 /6 + ) .
dt
Compare with
FE :
xn+1 =
xn (1 h)
BE :
xn+1 =
xn
1
= xn (1 h + h2 + )
1+h
TRZ :
xn+1 =
xn
1 h/2
= xn (1 h + h2 /2 h3 /4 + )
1 + h/2
FE
104
BE
local
local
TRZ
108
numerical
exact
tn
tn+1
tn+2
1012
104
103
102
101
* The local error is the error made in a single step, assuming that the
starting point is exact. In this case, starting from the exact value,
x(0) = 1, the difference |x(h) x(h)| has been computed.
100
FE
104
BE
local
local
TRZ
108
numerical
exact
tn
tn+1
tn+2
1012
104
103
102
101
* The local error is the error made in a single step, assuming that the
starting point is exact. In this case, starting from the exact value,
x(0) = 1, the difference |x(h) x(h)| has been computed.
* If h h/10, the error decreases by a factor of 102 for the FE and BE
methods, and by 103 for the TRZ method.
100
FE
104
BE
local
local
TRZ
108
numerical
exact
tn
tn+1
tn+2
1012
104
103
102
101
100
* The local error is the error made in a single step, assuming that the
starting point is exact. In this case, starting from the exact value,
x(0) = 1, the difference |x(h) x(h)| has been computed.
* If h h/10, the error decreases by a factor of 102 for the FE and BE
methods, and by 103 for the TRZ method.
* The TRZ method is therefore said to be more accurate than FE or BE.
M. B. Patil, IIT Bombay
1.0
h=0.5
TRZ
BE
exact
0.8
0.6
0.4
0.2
0.0
1.0
h=0.5
TRZ
BE
exact
0.8
0.6
0.4
0.2
0.0
* The higher accuracy of the TRZ method allows larger time steps.
h=0.1
1.0
exact
FE
BE
0.8
0.6
0.4
0.2
0.0
h=0.1
1.0
exact
FE
BE
0.8
0.6
0.4
0.2
0.0
h=0.5
1.0
0.8
0.6
0.4
0.2
0.0
h=2.0
h=0.1
1
1.0
exact
FE
BE
0.8
0.6
0
0.4
0.2
0.0
h=0.5
1.0
0.8
0.6
0.4
0.2
0.0
10
15
20
h=2.0
h=0.1
1
1.0
exact
FE
BE
0.8
0.6
0
0.4
0.2
0.0
h=0.5
10
15
20
15
20
h=2.1
1.0
0.8
2
1
0.6
0
0.4
0.2
0.0
2
0
10
= xn + h (xn2 )
xn+1
= xn +
2
h (xn+1
)
xn+1
= xn +
h
2
(xn2 xn+1
)
2
(FE ) ,
(BE ) ,
(TRZ ) .
= xn + h (xn2 )
xn+1
= xn +
2
h (xn+1
)
xn+1
= xn +
h
2
(xn2 xn+1
)
2
(FE ) ,
(BE ) ,
(TRZ ) .
= xn + h (xn2 )
xn+1
= xn +
2
h (xn+1
)
xn+1
= xn +
h
2
(xn2 xn+1
)
2
(FE ) ,
(BE ) ,
(TRZ ) .
= xn + h (xn2 )
xn+1
= xn +
2
h (xn+1
)
xn+1
= xn +
h
2
(xn2 xn+1
)
2
(FE ) ,
(BE ) ,
(TRZ ) .
h n+1
i
+ vCn
C C
OR
iCn+1 =
C n+1 C n
v
vC .
h C
h
h n+1
i
+ vCn
C C
OR
iCn+1 =
C n+1 C n
v
vC .
h C
h
vCn+1
vCn
in+1
C
+
h/C
iC
vC
h/C
in+1
C
vCn C/h
M. B. Patil, IIT Bombay
Start (t = t0)
t = t + t
t = k1 t
Yes
NR
t = t/k2
Converged?
t = tmin ?
No
No
t = tmax ?
Yes
No
Yes
Stop
V2, V4 (Volts)
4
V2
3
2
V4
1
0
120
V1
Vs
V3
V2
R2
R0
V4
C0
h ( sec)
100
R1
80
60
40
20
4
time (msec)
40
i
C
R V
V (Volts)
20
0.01
0.02
Time (sec)
0.03
V (Volts)
20.48
20.44
0.026
0.028
Time (sec)
0.030
40
i
C
R V
V (Volts)
20
0.01
0.02
Time (sec)
0.03
V (Volts)
20.48
20.44
0.026
0.028
Time (sec)
0.030
R2
Vs
0.2
Vc
0.2
0
0.4
0.01
time
0.02
* Start with an initial guess for the state variable(s) (the capacitor voltage
here).
R2
Vs
0.2
Vc
0.2
0
0.4
0.01
time
0.02
* Start with an initial guess for the state variable(s) (the capacitor voltage
here).
* Integrate for one cycle. Is Vc (T ) = Vc (0)?
R2
Vs
0.2
Vc
0.2
0
0.4
0.01
time
0.02
* Start with an initial guess for the state variable(s) (the capacitor voltage
here).
* Integrate for one cycle. Is Vc (T ) = Vc (0)?
* If yes (red curve), we have obtained the SSW solution; if not, we need to
compute a better initial guess (in an outer Newton-Raphson loop) and
repeat [7].
M. B. Patil, IIT Bombay
SSW: Examples
Example
Ntrns
Nssw
750
Boost Converter
625
C
uk Converter
1250
1- half-wave rectifier
150
110
200
Induction motor
125
17
Buck Converter
* Note the dramatic reduction in computational effort for the SSW method
as compared to transient analysis.
References
[1] L. O. Chua and P. M. Lin, Computer-Aided Analysis of Electronic Circuits, Englewood Cliffs:
Prentice-Hall, 1976.
[2] W. J. McCalla, Fundamentals of Computer-Aided Circuit Simulation, Boston: Kluwer
Academic Publishers, 1987.
[3] R. Raghuram, Computer Simulation of Electronic Circuits, New Delhi: Wiley Eastern, 1989.
[4] K. S. Kundert, The Designers Guide to SPICE and SPECTRE, Boston: Kluwer Academic
Publishers, 1995.
[5] M. B. Patil, V. Ramanarayanan, and V. T. Ranganathan, Simulation of Power Electronic
Circuits, to be published.
[6] C. D. Hachtel and R. K. Brayton and F. G. Gustavson, The sparse tableau approach to
network analysis and design, IEEE Trans. CT, vol. 18, pp. 101-113, 1971.
[7] F. R. Colon and T. N. Trick, Fast periodic steady-state analysis for large-signal electronic
circuits, IEEE J. Solid-State Circuits, vol. 8, pp. 260-269, 1973.
[8] C. F. Gerald and P. O. Whitley, Applied Numerical Analysis, Delhi: Pearson Education India,
1999.