Upload
ngodat
View
216
Download
0
Embed Size (px)
Citation preview
J. Roychowdhury, University of California at Berkeley Slide 1
Quiescent Steady State (DC) Analysis
The Newton-Raphson Method
J. Roychowdhury, University of California at Berkeley Slide 2
Solving the System's DAEs
● DAEs: many types of solutions useful● DC steady stateDC steady state: no time variations● transienttransient: ckt. waveforms changing with time● periodic steady state: changes periodic w time
➔ linear(ized): all sinusoidal waveforms: AC analysisAC analysis➔ nonlinear steady state: shootingshooting, harmonic balanceharmonic balance
● noise analysisnoise analysis: random/stochastic waveforms● sensitivity analysissensitivity analysis: effects of changes in circuit
parameters
d
dt~q (~x(t)) + ~f (~x(t)) +~b(t) = ~0
J. Roychowdhury, University of California at Berkeley Slide 3
QSS: Quiescent Steady State(“DC”) Analysis
● Assumption: nothing changes with timeAssumption: nothing changes with time● x, b are constant vectors; d/dt term vanishes
d
dt~q (~x(t)) + ~f (~x(t)) +~b(t) = ~0
~g(~x)z }| {~f (~x) +~b = ~0
● Why do QSS?➔ quiescent operation: first step in verifying functionality➔ stepping stone to other analyses: AC, transient, noise, ...
● Nonlinear system of equationsNonlinear system of equations➔ the problem: solving them numerically➔ most common/useful technique: Newton-RaphsonNewton-Raphson method
J. Roychowdhury, University of California at Berkeley Slide 4
The Newton Raphson Method● IterativeIterative numerical algorithm to solve
1 start with some guess for the solution2 repeat
a check if current guess solves equationi if yes: done!ii if no: do something to update/improve the guess
● Newton-Raphson algorithm● start with initial guess ; i=0● repeat until “convergence” (or max #iterations)
➔ compute Jacobian matrix:
➔ solve for update :➔
➔ update guess: ➔ i++;
~g(~x) = ~0
~x0
Ji =d~g(~xi)
d~x
Ji ±~x = ¡~g(~xi)±~x
~xi+1 = ~xi + ±~x
J. Roychowdhury, University of California at Berkeley Slide 5
Newton-Raphson Graphically
● Scalar case above● Key property: generalizes to vector case
g(x)
J. Roychowdhury, University of California at Berkeley Slide 6
Newton Raphson (contd.)● Does it always work? No.
● Conditions for NR to converge reliably➔ g(x) must be “smooth”: continuous, differentiable➔ starting guess “close enough” to solution
● practical NR: needs application-specific heuristics
J. Roychowdhury, University of California at Berkeley Slide 7
NR: Convergence Rate
● Key property of NR: quadratic convergence● Suppose is the exact solution of ● At the NR iteration, define the error● meaning of quadratic convergence:
● (where c is a constant)
● NR's quadratic convergence properties➔ if is smooth (at least continuous 1st and 2nd derivatives)➔ and ➔ and is small enough, then:
➔ NR features quadratic convergence
ithx¤ g(x) = 0
²i = xi ¡ x¤²i+1 < c²
2i
kxi ¡ x¤k
g(x)
g0(x¤) 6= 0
J. Roychowdhury, University of California at Berkeley Slide 8
Convergence Rate in Digits of Accuracy
Quadratic convergence Linear convergence
J. Roychowdhury, University of California at Berkeley Slide 9
NR: Convergence Strategies
● reltol-abstol on deltax● stop if norm(deltax) <= tolerancenorm(deltax) <= tolerance
➔ tolerance = abstol + reltol*xtolerance = abstol + reltol*x● reltol ~ 1e-3 to 1e-6● abstol ~ 1e-9 to 1e-12
● better➔ apply to individual vector entries (and AND)➔ organize x in variable groups: e.g., voltages, currents, …➔ (scale DAE equations/unknowns first)
● more sophisticated possible➔ e.g., use sequence of x values to estimate conv. rate
● residual convergence criterion● stop if
● Combinations of deltax and residual● ultimately: heuristics, tuned to application
k~g(~x)k < ²residual
J. Roychowdhury, University of California at Berkeley Slide 10
Newton Raphson Update Step● Need to solve linear matrix equation
● : Ax = b problem
● : Jacobian matrixJacobian matrix
● Derivatives of vector functionsDerivatives of vector functions
● If
● … then
J =d~g(~x)
d~x
J ¢~x = ¡~g(~x)
~x(t) =
264x1...xn
375 ; ~g(~x) =
264g1(x1; ¢ ¢ ¢ ; xn)
...g1(x1; ¢ ¢ ¢ ; xn)
375
d~g
d~x,
266666664
dg1dx1
dg1dx2
¢ ¢ ¢ dg1dxn¡1
dg1dxn
dg2dx1
dg2dx2
¢ ¢ ¢ dg2dxn¡1
dg2dxn
...... ¢ ¢ ¢
......
dgn¡1
dx1
dgn¡1
dx2¢ ¢ ¢ dgn¡1
dxn¡1
dgn¡1
dxndgndx1
dgndx2
¢ ¢ ¢ dgndxn¡1
dgndxn
377777775
J. Roychowdhury, University of California at Berkeley Slide 11
DAE Jacobian Matrices
● Ckt DAE:iL
2°1°
iE
d
dt~q (~x(t)) + ~f (~x(t)) +~b(t) = ~0
~x(t) =
2664
e1(t)e2(t)iL(t)iE(t)
3775 ~q(~x) =
2664
0Ce20
¡LiL
3775 ~f(~x) =
2664
¡diode(¡e1; IS ; Vt)¡ iEiE + iL +
e2R
e2 ¡ e1e2
3775~b(t) =
2664
00
¡E(t)0
3775
Jf ,d~f
d~x=
2664
ddiodedv (¡e1) 0 0 ¡10 1
R 1 1¡1 1 0 00 1 0 0
3775Jq ,
d~q
d~x=
2664
0 0 0 00 C 0 00 0 0 00 0 ¡L 0
3775
J. Roychowdhury, University of California at Berkeley Slide 12
Newton Raphson: Computation
● Need to solve linear matrix equation● : Ax = b problem
● Ax=b: where much of the computation liesAx=b: where much of the computation lies● large circuits (many nodes): large DAE systems,
large Jacobian matrices● in general (for arbitrary matrices of size n)
➔ solving Ax = b requires● O(n2) memory● O(n3) computation!● (using, e.g., Gaussian Elimination)
➔ but for most circuit Jacobian matrices● O(n) memory, ~O(n1.4) computation● … because circuit Jacobians are typically sparsesparse
J ¢~x = ¡~g(~x)