Upload
nivas-buvaneswaran
View
217
Download
0
Embed Size (px)
Citation preview
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 1/51
1
EE 616
Computer Aided Analysis of Electronic Networks
Lecture 5
Instructor: Dr. J. A. Starzyk, Professor
School of EECS
Ohio University
Athens, O, !"#$%
09/19/2005
Note materials in t!is lecture are from
t!e notes of EE219A "C#$erkeley
!ttp//www#cad%eecs%$erkeley%edu/&nardi/EE219A/contents%!tml
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 2/51
&
'utline
Nonlinear pro$lems (terati)e *et!ods Newton+s *et!od
, -eri)ation of Newton
, .uadratic Con)erence
, Eamples
, Con)erence estin
*ultidimensonal Newton *et!od , asic Alorit!m
, .uadratic con)erence
, Application to circuits
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 3/51
'
Need to Solve
( %) $d
t
V V
d s I I e− − =
0
1
Ir I% I
*
$)%(%
$
%%
%
%
=−−+
=−+
I e I e R
I I I
t V
e
s
d r
%%)( I e g =
-C Analysis of Nonlinear Circuits # Eample
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 4/51
!
Nonlinear E3uations
4i)en g(V)=I
(t can $e epressed as f(V)=g(V)-I
⇒ ol)e g(V)=I e3ui)alent to sol)e f(V)=0
Hard to find analytical solution for f(x)=0
Solve iteratively
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 5/51
"
Nonlinear E3uations , (terati)e *et!ods
tart from an initial )alue x 0
4enerate a se3uence of iterate x n-1, x n, x n+1
w!ic! !opefully con)eres to t!e solution x* (terates are enerated accordin to an
iteration function F: x n+1=F(x n )
Ask
• When does it converge to correct solution ?
• What is the convergence rate ?
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 6/51
+
Newton#ap!son 7N8 *et!od
Consists of lineariin t!e system%:ant to sol)e f78;0 → eplace f78 wit! its linearied )ersion
and sol)e%
Note at eac! step need to e)aluate f and f’
function Iteration x f xdxdf x x
x x xdx
df x f x f
iesTaylor Ser x x xdx
df x f x f
k k k k
k k k k k
)()(
))(()()(
))(()()(
%
%
%%
−
+
++
−=⇒
−+=
−+=
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 7/51
#
Newton#ap!son *et!od , 4rap!ical <iew
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 8/51
-
Newton#ap!son *et!od , Alorit!m
Define iteration
Dok = 0 to ….?
until convergence
=ow a$out con)erence> An iteration {x (k) } is said to con)ere wit! order q if t!ere eists a
)ector norm suc! t!at for eac! k ≥ N
qk k
x x x x
%
−≤−
+
)()(
%
% k k k k
x f xdx
df
x x
−
+
−=
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 9/51
/
& &
&
$ ( ) ( ) ( )( ) ( )( )
so0e 1 , 2
k k k k
k
df d f f x f x x x x x x x
dx dx
x x x
= = + − + −
∈
%
%
Mean Value theoremtruncates Taylor series
But
%$ ( ) ( )( )k k k k df f x x x x
dx
+= + − by Newtondefinition
Newton#ap!son *et!od , Con)erence
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 10/51
%$
Subtracting
&
% % &&( ) 1 ( )2 ( )( )k k k df d f x x x x x x
dx d x+ −− = −%
Convergence is quadratic
&% &
&( )( ) ( )( )k k k df d f x x x x x x
dx d x
+ − = −%
Dividing
&%
&
&%
3et 1 ( )2 ( )
then
k k
k k k
df d f x x K
dx d x
x x K x x
−
+
=
− ≤ −
%
Newton#ap!son *et!od , Con)erence
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 11/51
%%
Local Convergence Theorem
If
Then Newton’s method converges given asufficiently close initial guess(and convergence isquadratic)
bounded is K
bounded dx
f d b
roay from zebounded awdx
df a
)
)
&
&
Newton#ap!son *et!od , Con)erence
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 12/51
%&
( )( )
( ) ( )( )
&%
& &%
&
&
%
( ) &
( ) % $,
& ( ) %
& ( ) & ( )
%( ) (
( %
)&
)
k k
k k k k
k k k k k
k k
k
df
x xdx
x x x x
x x x x x x x
f x x fin
x
d x x
or x x x x x
+
+
+
=− = − −
− + − = −
=
−
−
−
= −
= =
Convergence is quadratic
Newton#ap!son *et!od , Con)erence
Eample 1
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 13/51
%'
( )
% &
%
%
&
( ) &
& ( $) ( $)
%$ $
( ) $,
for $
&%
( ) ( )&
$
k k
k k k
k k k
k k
df x x
dx x x x
x x x x
or x x x
f x
x
x x
+
+
+
=
⇒ − = −
− = − ≠ =
− = −
= = =
Convergence is linear
Note : not bounded
away from zero
%df
dx
−
Newton#ap!son *et!od , Con)erence
Eample 2
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 14/51
%!
Newton#ap!son *et!od , Con)erence
Eample 1? 2
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 15/51
%"
$ Initial 4uess,5 $ x k =
6e7eat 8
( ) ( ) ( )%
k
k k k
f x x x f x
x+
∂− = −∂
9 Until
( )% % k k k f x tresold x x tresold ++ <− <
%k k = +
Newton#ap!son *et!od , Con)erence
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 16/51
%+
;ee* a <*elta=>< check to avoi* false conver?ence
X
f(x)
%k
x
+ k
x
x
( )% a
k
f f x ε + <
% % a r
k k k x x x x xε ε + +− > +
Newton#ap!son *et!od , Con)erence C!eck
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 17/51
%#
( )Also nee* an < < check to avoi* false conver?ence f x
X
f(x)
%k x + k x
x
( )% a
k
f f x ε + >
% % a r
k k k
x x x x xε ε + +− < +
Newton#ap!son *et!od , Con)erence C!eck
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 18/51
%-
Newton#ap!son *et!od , Con)erence
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 19/51
%/
Convergence Depends on a Good Initial Guess
X
f(x)
$ x
% x
& x $ x
% x
Newton#ap!son *et!od , Local Con)erence
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 20/51
&$
Convergence Depends on a Good Initial Guess
Newton#ap!son *et!od , Local Con)erence
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 21/51
&%
Nodal Analysis
% &At ;o*e %: $i i+ =
NonlinearResistors
( )i g !=
%
b
!
+
-
%i
&i&
b!
'i+ -
'
b
!
+
-
%!&!
( ) ( )% % & $ g ! g ! !⇒ + − =
' &At ;o*e &: $i i− =
( ) ( )' % & $ g ! g ! !⇒ − − =
Two couplednonlinear equationsin two unknowns
Nonlinear @ro$lems , *ultidimensional Eample
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 22/51
&&
( ) Pro@le0: in* such tha $t x " x = ; ; ; an* : x " ∈ →¡ ¡ ¡
*ultidimensional Newton *et!od
function Iteration x " x # x x
atrix #acobian $
x
x "
x
x "
x
x "
x
x "
x #
iesTaylor Ser x x x # x " x "
k k k k
%
% %
%
)()(
)()(
)()(
)(
))(()()(
%%
%
%
%
%
−+ −=⇒
∂∂
∂∂
∂∂
∂∂
=
−+=
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 23/51
&'
)()()( :solveInstea*
s7arse).notis(it)(co07utenotDo
)()(:
%
%
%%
k k k k
k
k k k k
x " x x x #
x #
x " x # x x Iteration
−=−
−=
+
−
−+
Eac! iteration re3uires
1% E)aluation of F(x k )
2% Computation of J(x k
) % olution of a linear system of ale$raic
e3uations w!ose coefficient matri is J(x k ) and
w!ose = is -F(x k )
*ultidimensional Newton *et!od , Computational Aspects
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 24/51
&!
$ Initial 4uess,5 $ x k =
6e7eat 8
( ) ( ) ( )% %Solve fork k k k k
" # x x x " x x+ +− = −
9 Until ( )%% , s0all en u?o hk k k x x f x ++ −
%k k = +
( ) ( )Co07ute ,k k
" " x # x
*ultidimensional Newton *et!od , Algorithm
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 25/51
&"
If
( ) ( )%) Inverse is @oun*e*k " a # x β − ≤
( ) ( ) ( )) Derivative is 3i7schitz Cont " " b # x # y x y− ≤ −l
Then Newton’s method converges given asufficiently close initial guess(and convergenceis quadratic)
Local Convergence Theorem
*ultidimensional Newton *et!od , Convergence
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 26/51
&+
Application of N to Circuit E3uationsCompanion Network
Applyin N to t!e system of e3uations we findt!at at iteration kB1 , all t!e coefficients of CL? <L and of CE of t!e linear
elements remain unc!aned wit! respect to iteration k , Nonlinear elements are represented $y a lineariationof CE around iteration k
⇒ !is system of e3uations can $e interpreted ast!e A of a linear circuit 7companion network8
w!ose elements are specified $y t!e lineariedCE%
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 27/51
&#
4eneral procedure t!e N met!od applied to anonlinear circuit 7w!ose e3ns are formulated int!e A form8 produces at eac! iteration t!eA e3ns of a linear resisti)e circuit o$tained $y
lineariin t!e CE of t!e nonlinear elementsand lea)in all t!e ot!er CE unmodified
After t!e linear circuit is produced? t!ere is noneed to stick to A? $ut ot!er met!ods 7suc! as
*NA8 may $e used to assem$le t!e circuit e3ns
Application of N to Circuit E3uationsCompanion Network
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 28/51
&-
Note: G 0 and I
d depend on the iteration count k
G 0=G 0(k) and I d =I d (k)
Application of N to Circuit E3uationsCompanion Network , *NA templates
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 29/51
&/
Application of N to Circuit E3uationsCompanion Network , *NA templates
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 30/51
'$
*odelin a *'DE7*' Le)el 1? linear reime8
d
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 31/51
'%
*odelin a *'DE7*' Le)el 1? linear reime8
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 32/51
'&
-C Analysis Dlow -iaram
For each state variable in the system
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 33/51
''
(mplications
-e)ice model e3uations must $e continuous wit!continuous deri)ati)es and deri)ati)e calculation must $eaccurate deri)ati)e of function , 7not all models do t!is # @oor diode models and $reakdown
models don+t # $e sure models are decent # $eware of user#
supplied models8 :atc! out for floatin nodes 7(f a node $ecomes
disconnected? t!en 78 is sinular8 4i)e ood initial uess for 708
*ost model computations produce errors in function)alues and deri)ati)es% , :ant to !a)e con)erence criteria FF 7kB18 # 7k8 FF G ε suc! t!at ε H
t!an model errors%
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 34/51
'!
ummary
Nonlinear pro$lems (terati)e *et!ods
Newton+s *et!od
, -eri)ation of Newton , .uadratic Con)erence
, Eamples
, Con)erence estin
*ultidimensonal Newton *et!od , asic Alorit!m
, .uadratic con)erence
, Application to circuits
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 35/51
'"
(mpro)in con)erence
(mpro)e *odels 7I0J of pro$lems8
(mpro)e Alorit!ms 720J of pro$lems8
Docus on new alorit!msLimitin c!emes
Continuations c!emes
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 36/51
'+
'utline
Limitin c!emes , -irection Corruptin
, Non corruptin 7-amped Newton84lo$ally Con)erent if aco$ian is Nonsinular
-ifficulty wit! inular aco$ians
Continuation c!emes , ource steppin
, *ore 4eneral Continuation c!eme , (mpro)in Efficiency
etter first uess for eac! continuation step
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 37/51
'#
At a local 0ini0u0, $ f
x
∂=
∂
LocalMinimum
( )Bulti*i0ensional Case: is sin?ular " # x
*ultidimensional Newton *et!odCon)erence @ro$lems , Local *inimum
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 38/51
'-
f(>)
$
x
% x
Bust So0eho 3i0it the chan?es in
*ultidimensional Newton *et!odCon)erence @ro$lems , Nearly sinular
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 39/51
'/
*ultidimensional Newton *et!odCon)erence @ro$lems # ')erflow
f(>)
$ x %
x
Bust So0eho 3i0it the chan?es in
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 40/51
!$
$ Initial 4uess,5 $ x k =
6e7eat 8
( ) ( )% %Solve fork k k k
" # x x " x x+ +∆ = − ∆
9 Until ( )% % , s0all enou?hk k x " x ++∆
%k k = +
( ) ( )Co07ute ,k k
" " x # x
( ) ;eton Al?orith0 for Solvin? $ " x =
( )% %li0ite*k k k x x x+ += + ∆
Newton *et!od wit! Limitin
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 41/51
!%
( )%li0ite* k
i x +∆ =
;onCorru7tin?
% % ifk k
i i x x γ + +∆ ∆ <
( )% otherisek
i sign xγ +∆
Direction Corru7tin?
( )% %li0ite* k k x xα + +∆ = ∆
%0in %,
k x
γ α +
= ∆
γ
%k x +∆( )%li0ite*
k x
+∆
γ
%k x +∆( )%li0ite* k x +∆
euristics, ;o 4uarantee of 4lo@al Conver?ence
Newton *et!od wit! LimitinLimitin *et!ods
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 42/51
!&
4eneral Da07in? Sche0e
Fey I*ea: 3ine Search
( )&
%
&Pick to 0ini0izek k k k " x xα α ++ ∆
Betho* Perfor0s a one=*i0ensional search in
;eton Direction
( ) ( ) ( )&% % %
&
T k k k k k k k k k " x x " x x " x xα α α + + ++ ∆ ≡ + ∆ + ∆
% %k k k k x x xα + += + ∆
( ) ( )% %Solve fork k k k
" # x x " x x+ +∆ = − ∆
Newton *et!od wit! Limitin-amped Newton c!eme
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 43/51
!'
If
( ) ( )%) Inverse is @oun*e*k
" a # x β − ≤
( ) ( ) ( )) Derivative is 3i7schitz Cont " " b # x # y x y− ≤ −l
Then
( ]Ghere e>ists a set of H $,% such thatk sα ∈
( ) ( ) ( )% % ith %k k k k k " x " x x " xα γ γ + += + ∆ <
Every Ste7 re*uces == 4lo@al Conver?ence
Newton *et!od wit! Limitin-amped Newton , Con)erence !eorem
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 44/51
!!
$ Initial 4uess,5 $ x k =
6e7eat 8
( ) ( )% %Solve fork k k k
" # x x " x x+ +∆ = − ∆
9 Until ( )% % , s0all enou?hk k x " x ++∆
%k k = +
( ) ( )Co07ute ,k k
" " x # x
( ] ( )%
in* $,% such that is 0ini0i ez *
k k k k
" x xα α
+
+ ∆∈% %k k k k x x xα + += + ∆
Newton *et!od wit! Limitin-amped Newton , Nested (teration
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 45/51
!"
X$ x% x
& x%
& x
Damped Newton Methods “push” iterates to local minimumsFinds the points where Jacobian is Singular
Newton *et!od wit! Limitin-amped Newton , inular aco$ian @ro$lem
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 46/51
!+
( )( )Solve , $ here: " x λ λ =%
( )( )a) $ ,$ $ is easy to solve " x =%
( )( ) ( ) @) % ,% " x " x=%
( )c) is sufficiently s0ooth x λ
Starts the continuation
Ends the continuation
Hard to insure!
Newton wit! Continuation sc!emesasic Concepts # 4eneral settin
Newton con)eres i)en a close initial uess
⇒ (dea 4enerate a se3uence of pro$lems? s%t% a pro$lem
is a ood initial uess for t!e followin one
→= $)( x "
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 47/51
!#
( )( ) ( ) ( )Solve $ ,$ , $ 're! " x x xλ =%
Khile % 8λ <
9
( ) ( )$
're! x xλ λ =( )( )Gry to Solve , $ ith ;eton " x λ λ =%
If ;eton Conver?e*
( ) ( ), &,
're!
x xλ λ λ λ λ δλ δλ δ = = =+
Else
,%
& 're!λ δλ λ δ δλ λ = +=
Newton wit! Continuation sc!emesasic Concepts , emplate Alorit!m
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 48/51
!-
Newton wit! Continuation sc!emesasic Concepts , ource teppin Eample
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 49/51
!/
Diode
( )( ) ( ) ( )%
, $diode s f ! i ! ! V R
λ λ λ = + − =%
B
#Vs
R !
( ) ( ), % ;ot *e7en*entJ
diode f ! i !
! ! R
λ λ ∂ ∂= + ←∂ ∂
%
Source Stepping Does Not Alter Jacobian
Newton wit! Continuation sc!emesasic Concepts , ource teppin Eample
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 50/51
"$
( )( ) ( ) $ ,$5 $ $$ " x xλ = =%
Observations
( )( )$ ,$ " x I
x
∂=
∂
%
( )( ) ( )( ) 5% % ,% % " x " xλ =%
( )( ) ( )( )$ ,$ % " x " x
x x
∂ ∂=
∂ ∂
%
Problem is easy to solve andJacobian definitely nonsingular.
Back to the original problemand original Jacobian
( )( ) ( )( ) ( ) ( ), % " x " x xλ λ λ λ λ λ = + −%
Newton wit! Continuation sc!emesaco$ian Alterin c!eme
718?18
8/18/2019 Lecture 5Software engineering
http://slidepdf.com/reader/full/lecture-5software-engineering 51/51
ummary
Newton+s *et!od works fine , i)en a close enou! initial uess
(n case Newton does not con)ere , Limitin c!emes
-irection Corruptin
Non corruptin 7-amped Newton8
, 4lo$ally Con)erent if aco$ian is Nonsinular
, -ifficulty wit! inular aco$ians
, Continuation c!emesource steppin
*ore 4eneral Continuation c!eme
(mpro)in Efficiency
,