Professional Documents
Culture Documents
Lecture 5
09/19/2005
Note: materials in this lecture are from
the notes of EE219A UC-berkeley
http://www-
1 cad.eecs.berkeley.edu/~nardi/EE219A/contents.html
Outline
Nonlinear problems
Iterative Methods
Newtons Method
Derivation of Newton
Quadratic Convergence
Examples
Convergence Testing
Multidimensonal Newton Method
Basic Algorithm
Quadratic convergence
Application to circuits
2
DC Analysis of Nonlinear Circuits - Example
1
Vd
I1 Ir I I d I s (e Vt
1) 0
d
0
Need to Solve
I r I d I1 0
e1
1
e1 I s (e 1) I1 0
Vt
g (e1 ) I1
R
3
Nonlinear Equations
Given g(V)=I
It can be expressed as: f(V)=g(V)-I
Solve iteratively
4
Nonlinear Equations Iterative Methods
Ask
When does it converge to correct solution ?
What is the convergence rate ?
5
Newton-Raphson (NR) Method
dx
1
k 1 df k
x x
k
( x ) f (xk ) Iteration function
dx
Note: at each step need to evaluate f and f
6
Newton-Raphson Method Graphical View
7
Newton-Raphson Method Algorithm
Define iteration
Do k = 0 to .?
1
k 1 df k
x x k
( x ) f (xk )
dx
until convergence
k 1 q
x x x x
k
8
Newton-Raphson Method Convergence
2
df d f
0 f ( x ) f ( x ) ( x )( x x ) 2 ( x%
* k k * k
)( x* x k ) 2
dx dx
some x% [ x k , x* ]
dx definition
9
Newton-Raphson Method Convergence
Subtracting
df k k 1 * d2 f
( x )( x x ) 2 ( x% )( x k x* ) 2
dx d x
2
df d f
Dividing k 1 * k 1
( x x ) [ ( x )] 2
( %
x )( x k
x * 2
)
dx d x
df k 1 d 2 f
Let [ ( x )] 2
( x) K
% k
dx d x
k 1 * 2
then x x K x x
* k k
Convergence is quadratic
10
Newton-Raphson Method Convergence
x 0 = Initial Guess, k 0
Repeat {
f x k
x
x k 1
xk f xk
k k 1
} Until ?
x k 1
x threshold ?
k
f x k 1
threshold ?
12
Newton-Raphson Method Convergence Check
k 1 k
x x x *
X
f x k 1 fa
13
Newton-Raphson Method Convergence Check
f(x)
f x k 1 fa
x*
x k 1 x k X
x k 1 x k xa xr x k 1
14
Newton-Raphson Method Convergence
15
Newton-Raphson Method Local Convergence
f(x)
x1 x1
2 0 0 X
x x x
16
Newton-Raphson Method Local Convergence
17
Nonlinear Problems Multidimensional Example
v1 i2 + v2b - v2
i1 i3 Nodal Analysis
+ + At Node 1: i1 i2 0
v1b v3b
g v1 g v1 v2 0
- -
At Node 2: i3 i2 0
g v3 g v1 v2 0
Nonlinear
Resistors Two coupled
i g v nonlinear equations
in two unknowns
18
Multidimensional Newton Method
Iteration : x k 1 x k J ( x k ) 1 F ( x k )
k 1
Do not compute J ( x ) (it is not sparse).
k 1
Instead solve : k
J ( x )( x x ) F (x )
k k
x 0 = Initial Guess, k 0
Repeat {
Compute F x k , J F x k
Solve J F x x x F x
k k 1 k k
for x k 1
k k 1
} Until x k 1 x k ,
f x k 1 small enough
21
Multidimensional Newton Method Convergence
If
a)
J F1 x k Inverse is bounded
b) JF x JF y l x y Derivative is Lipschitz Cont
23
Application of NR to Circuit Equations
Companion Network
26
Modeling a MOSFET
(MOS Level 1, linear regime)
27
Modeling a MOSFET
(MOS Level 1, linear regime)
gds
28
DC Analysis Flow Diagram
For each state variable in the system
29
Implications
30
Summary
Nonlinear problems
Iterative Methods
Newtons Method
Derivation of Newton
Quadratic Convergence
Examples
Convergence Testing
Multidimensional Newton Method
Basic Algorithm
Quadratic convergence
Application to circuits
31
Improving convergence
32
Outline
Limiting Schemes
Direction Corrupting
Non corrupting (Damped Newton)
Globally Convergent if Jacobian is Nonsingular
Difficulty with Singular Jacobians
Continuation Schemes
Source stepping
More General Continuation Scheme
Improving Efficiency
Better first guess for each continuation step
33
Multidimensional Newton Method
Convergence Problems Local Minimum
Local
Minimum
f
At a local minimum, 0
x
34 Multidimensional Case: J F x is singular
Multidimensional Newton Method
Convergence Problems Nearly singular
f(x)
x1
0
X
x
0
X
x x1
Solve J F x x F x
k k 1 k
for x k 1
x k 1 x k limited x k 1
k k 1
} Until
x k 1 , F x k 1 small enough
37
Newton Method with Limiting
Limiting Methods
Direction Corrupting
limited x k 1 x k 1
xik 1 if xik 1
limited x k 1
sign xik 1 otherwise
i
x k 1 x k k x k 1
Fx
2
k 1 T
F x x
k k k 1
F x x
k k k
k x k 1
2
If
a)
J F1 x k Inverse is bounded
b) JF x JF y l x y Derivative is Lipschitz Cont
Then
There exists a set of k ' s 0,1 such that
F x k 1 F x k k x k 1
F xk with <1
x2
1 0 X
x 1 xD x
While 1 {
x 0 x prev
Try to Solve F% x , 0 with Newton
If Newton Converged
x prev x , , 2
Else
1
, prev
} 2
43
Newton with Continuation schemes
Basic Concepts Source Stepping Example
44
Newton with Continuation schemes
Basic Concepts Source Stepping Example
R
v 1
f v , idiode v v Vs 0
%
R
Vs Diode
+
-
f% v, idiode v 1
Not dependent!
v v R
F% x , F x 1 x
Observations
=0 F% x 0 , 0 x 0 0 Problem is easy to solve and
Jacobian definitely nonsingular.
F% x 0 , 0
I
x
=1 F% x 1 ,1 F x 1
Back to the original problem
F% x (1),1)
0 , 0 F x 1 and original Jacobian
46 x x
Summary
Newtons Method works fine:
given a close enough initial guess
In case Newton does not converge:
Limiting Schemes
DirectionCorrupting
Non corrupting (Damped Newton)
Globally Convergent if Jacobian is Nonsingular
Difficulty with Singular Jacobians
Continuation Schemes
Source stepping
More General Continuation Scheme
Improving Efficiency
Better first guess for each continuation step
47