02 newton raphson

Upload: atulkumar-manchalwar

Post on 06-Apr-2018

254 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 02 Newton Raphson

    1/13

    J. Roychowdhury, University of California at Berkeley Slide 1

    Quiescent Steady State (DC) Analysis

    The Newton-Raphson Method

  • 8/3/2019 02 Newton Raphson

    2/13

    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 analy

    sis

    nonlinear steady state: shootingshooting

    , harmonic balanceharmonic balance noise analysisnoise analy

    sis: random/stochastic waveforms sensitivity analysissensitivity

    analysis: effects of changes in circuitparameters

    ddt

    ~q(~x(t)) + ~f (~x(t)) + ~b(t) = ~0

  • 8/3/2019 02 Newton Raphson

    3/13

    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-Rap

    hson method

  • 8/3/2019 02 Newton Raphson

    4/13J. Roychowdhury, University of California at Berkeley Slide 4

    The Newton Raphson Method

    IterativeIterative numerical algorithm to solve1 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~xJi ~x = ~g(~xi)~x

    ~xi+1 = ~xi + ~x

  • 8/3/2019 02 Newton Raphson

    5/13J. Roychowdhury, University of California at Berkeley Slide 5

    Newton-Raphson Graphically

    Scalar case above Key property: generalizes to vector case

    g(x)

  • 8/3/2019 02 Newton Raphson

    6/13J. 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

  • 8/3/2019 02 Newton Raphson

    7/13J. Roychowdhury, University of California at Berkeley Slide 7

    NR: Convergence Rate

    Key property of NR: quadratic convergence

    Suppose is the exactsolution 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 < c2i

    kxi xk

    g(x)

    g0(x) 6= 0

  • 8/3/2019 02 Newton Raphson

    8/13J. Roychowdhury, University of California at Berkeley Slide 8

    Convergence Rate in Digits ofAccuracy

    Quadratic convergence Linear convergence

  • 8/3/2019 02 Newton Raphson

    9/13J. Roychowdhury, University of California at Berkeley Slide 9

    NR: Convergence Strategies

    reltol-abstol on deltax stop ifnorm(deltax)

  • 8/3/2019 02 Newton Raphson

    10/13

    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) =

    264

    x1...

    xn

    375 ; ~g(~x) =

    264

    g1(x1; ; xn)...

    g1(x1; ; xn)

    375

    d~g

    d~x,

    266666664

    dg1dx1

    dg1dx2

    dg1dxn1

    dg1dxn

    dg2dx1

    dg2dx2

    dg2dxn1

    dg2dxn

    ......

    ......

    dgn1dx1

    dgn1dx2

    dgn1dxn1

    dgn1dxn

    dgn

    dx1

    dgn

    dx2 dgn

    dxn1

    dgn

    dxn

    377777775

  • 8/3/2019 02 Newton Raphson

    11/13

    J. Roychowdhury, University of California at Berkeley Slide 11

    DAE Jacobian Matrices

    Ckt DAE:iL

    21

    iE

    d

    dt

    ~q(~x(t)) + ~f (~x(t)) + ~b(t) = ~0

    ~x(t) =

    266

    4

    e1(t)e2(t)iL(t)iE(t)

    377

    5~q(~x) =

    2664

    0Ce2

    0LiL

    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=

    2664ddiodedv

    (e1) 0 0 10 1

    R1 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

  • 8/3/2019 02 Newton Raphson

    12/13

    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)

  • 8/3/2019 02 Newton Raphson

    13/13

    J. Roychowdhury, University of California at Berkeley Slide 13

    Dense vs Sparse Matrices

    Sparse Jacobians: typically 3N-4N non-zeros compare against N2 for dense