SlideShare a Scribd company logo
1 of 13
Quiescent Steady State (DC) Analysis

                   The Newton-Raphson Method




J. Roychowdhury, University of California at Berkeley   Slide 1
Solving the System's DAEs

                           d
                              ~ (~ (t)) + f (~ (t)) + ~ = ~
                              q x         ~ x         b(t) 0
                           dt
          ●   DAEs: many types of solutions useful
              ●   DC steady state: no time variations
                              state
              ●   transient: ckt. waveforms changing with time
                  transient
              ●   periodic steady state: changes periodic w time
                  ➔   linear(ized): all sinusoidal waveforms: AC analysis
                  ➔   nonlinear steady state: shooting, harmonic balance
                                                shooting
              ●   noise analysis: random/stochastic waveforms
                        analysis
              ●   sensitivity analysis: effects of changes in circuit
                              analysis
                  parameters

J. Roychowdhury, University of California at Berkeley                       Slide 2
QSS: Quiescent Steady State
                           (“DC”) Analysis
                      d
                         ~ (~ (t)) + f (~ (t)) + ~ = ~
                         q x         ~ x         b(t) 0
                      dt
         ●    Assumption: nothing changes with time
             ●   x, b are constant vectors; d/dt term vanishes
                             ~ (~ )
                             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 equations
                 ➔   the problem: solving them numerically
                 ➔   most common/useful technique: Newton-Raphson method
J. Roychowdhury, University of California at Berkeley                              Slide 3
The Newton Raphson Method
          ●   Iterative numerical algorithm to solve ~ (~ ) = ~
                                                     g x      0
              1       start with some guess for the solution
              2       repeat
                  a        check if current guess solves equation
                      i     if yes: done!
                      ii    if no: do something to update/improve the guess

          ●   Newton-Raphson algorithm
              ●       start with initial guess ~ 0 ; i=0
                                               x
              ●       repeat until “convergence” (or max #iterations)
                                                         d~ (~ i )
                                                          g x
                  ➔    compute Jacobian matrix: Ji =
                                                           d~x
                  ➔    solve for update ±~ : Ji ±~ = ¡~ (~ i )
                                          x      x       g x
                  ➔

                  ➔        update guess: ~ i+1 = ~ i + ±~
                                         x       x      x
                  ➔        i++;
J. Roychowdhury, University of California at Berkeley                         Slide 4
Newton-Raphson Graphically


          g(x)




           ● Scalar case above
           ● Key property: generalizes to vector case




J. Roychowdhury, University of California at Berkeley   Slide 5
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 6
NR: Convergence Rate
    ●    Key property of NR: quadratic convergence
                      ¤
        ● Suppose x is the exact solution of g(x) = 0


        ● At the i
                   th
                      NR iteration, define the error ²i = xi ¡ x¤
        ●   meaning of quadratic convergence: ²i+1 < c²2
                                                       i
                ●
                     (where c is a constant)

    ●    NR's quadratic convergence properties
            ➔
                    if g(x) is smooth (at least continuous 1st and 2nd derivatives)
            ➔       and g 0 (x¤ ) 6= 0
            ➔       and kxi ¡ x¤ k is small enough, then:
            ➔       NR features quadratic convergence



J. Roychowdhury, University of California at Berkeley                                 Slide 7
Convergence Rate in Digits of
                          Accuracy




              Quadratic convergence                     Linear convergence




J. Roychowdhury, University of California at Berkeley                        Slide 8
NR: Convergence Strategies
       ●   reltol-abstol on deltax
           ●   stop if norm(deltax) <= tolerance
               ➔       tolerance = 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 k~ (~ )k < ²residual
                        g x
       ●   Combinations of deltax and residual
           ●   ultimately: heuristics, tuned to application
J. Roychowdhury, University of California at Berkeley                               Slide 9
Newton Raphson Update Step
           ●   Need to solve linear matrix equation
               ●        J ¢~ = ¡~ (~ ) : Ax = b problem
                           x    g x
                        d~ (~ )
                         g x
               ●     J=         : Jacobian matrix
                         d~x
           ●   Derivatives of vector functions
                                   2 3                      2                      3
                                  x1                         g1 (x1 ; ¢ ¢ ¢ ; xn )
                                 6 . 7                      6                      7
               ●   If    ~ (t) = 4 . 5 ;
                         x         .               ~ (~ ) = 4
                                                   g x                 .
                                                                       .
                                                                       .           5
                                      xn                     g1 (x1 ; ¢ ¢ ¢ ; xn )
                                                   2    dg1         dg1                 dg1    dg1
                                                                                                     3
                                                        dx1         dx2       ¢¢¢      dxn¡1   dxn
                                           6            dg2         dg2                 dg2    dg2   7
                                           6                                  ¢¢¢                    7
                                       d~
                                        g  6            dx1         dx2                dxn¡1   dxn   7
                                           6 .                        .                  .       . 7
               ●   … then                 ,6 .                        .       ¢¢¢        .       . 7
                                        x 6 dg .
                                       d~                             .                  .       . 7
                                           6 n¡1                  dgn¡1
                                                                              ¢¢¢      dgn¡1   dgn¡1 7
                                           4 dx1                   dx2                 dxn¡1    dxn 5
                                                        dgn        dgn                  dgn    dgn
                                                        dx1        dx2        ¢¢¢      dxn¡1   dxn
J. Roychowdhury, University of California at Berkeley                                                    Slide 10
DAE Jacobian Matrices
                                                                                 1
                                                                                 °        2
                                                                                          °
                     d
        ●   Ckt DAE: ~ (~ (t)) + f (~ (t)) + ~ = ~
                       q x       ~ x         b(t) 0                                  iE
                    dt                                                                    iL




              2         3                 2    2        3                   3        2     3
            e1 (t)              0               ¡diode(¡e1 ; IS ; Vt ) ¡ iE            0
          6 e2 (t) 7         6 Ce2 7                                                 6 0 7
  ~ (t) = 6        7 ~(~ ) = 6      7 f (~ ) = 6     iE + iL + e2           7~
                                                                            7 b(t) = 6     7
  x       4 iL (t) 5 q x     4 0 5 ~x          6
                                               4         e2 ¡ e1
                                                                  R
                                                                            5        4¡E(t)5
            iE (t)             ¡LiL                       e2                           0




            2                                            3           2 ddiode                        3
             0                     0        0           0                 dv     (¡e1 )   0    0   ¡1
        d~
         q  60                     C        0           07         ~ 6
                                                                  df            0         1
                                                                                               1   17
   Jq ,    =6
            40
                                                         7   Jf ,    =6                   R          7
        d~
         x                         0        0           05        d~
                                                                   x  4        ¡1         1    0   05
             0                     0       ¡L           0                       0         1    0   0

J. Roychowdhury, University of California at Berkeley                                               Slide 11
Newton Raphson: Computation
         ●   Need to solve linear matrix equation
             ●       J ¢~ = ¡~ (~ ) : Ax = b problem
                        x    g x
         ●   Ax=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 sparse

J. Roychowdhury, University of California at Berkeley                        Slide 12
Dense vs Sparse Matrices




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

J. Roychowdhury, University of California at Berkeley    Slide 13

More Related Content

What's hot

Bound entanglement is not rare
Bound entanglement is not rareBound entanglement is not rare
Bound entanglement is not rare
wtyru1989
 
On gradient Ricci solitons
On gradient Ricci solitonsOn gradient Ricci solitons
On gradient Ricci solitons
mnlfdzlpz
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
ijceronline
 
Analisis Korespondensi
Analisis KorespondensiAnalisis Korespondensi
Analisis Korespondensi
dessybudiyanti
 
Discrete form of the riccati equation
Discrete form of the riccati equationDiscrete form of the riccati equation
Discrete form of the riccati equation
Alberth Carantón
 

What's hot (20)

PhD thesis presentation of Nguyen Bich Van
PhD thesis presentation of Nguyen Bich VanPhD thesis presentation of Nguyen Bich Van
PhD thesis presentation of Nguyen Bich Van
 
Merged Talk: A Verified Optimizer for Quantum Circuits & Verified Translation...
Merged Talk: A Verified Optimizer for Quantum Circuits & Verified Translation...Merged Talk: A Verified Optimizer for Quantum Circuits & Verified Translation...
Merged Talk: A Verified Optimizer for Quantum Circuits & Verified Translation...
 
Collier
CollierCollier
Collier
 
Bound entanglement is not rare
Bound entanglement is not rareBound entanglement is not rare
Bound entanglement is not rare
 
SOCG: Linear-Size Approximations to the Vietoris-Rips Filtration
SOCG: Linear-Size Approximations to the Vietoris-Rips FiltrationSOCG: Linear-Size Approximations to the Vietoris-Rips Filtration
SOCG: Linear-Size Approximations to the Vietoris-Rips Filtration
 
Resource theory of asymmetric distinguishability
Resource theory of asymmetric distinguishabilityResource theory of asymmetric distinguishability
Resource theory of asymmetric distinguishability
 
On gradient Ricci solitons
On gradient Ricci solitonsOn gradient Ricci solitons
On gradient Ricci solitons
 
qlp
qlpqlp
qlp
 
Calculating Non-adiabatic Pressure Perturbations during Multi-field Inflation
Calculating Non-adiabatic Pressure Perturbations during Multi-field InflationCalculating Non-adiabatic Pressure Perturbations during Multi-field Inflation
Calculating Non-adiabatic Pressure Perturbations during Multi-field Inflation
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
 
Aurelian Isar - Decoherence And Transition From Quantum To Classical In Open ...
Aurelian Isar - Decoherence And Transition From Quantum To Classical In Open ...Aurelian Isar - Decoherence And Transition From Quantum To Classical In Open ...
Aurelian Isar - Decoherence And Transition From Quantum To Classical In Open ...
 
LieGroup
LieGroupLieGroup
LieGroup
 
Nonlinear Stochastic Optimization by the Monte-Carlo Method
Nonlinear Stochastic Optimization by the Monte-Carlo MethodNonlinear Stochastic Optimization by the Monte-Carlo Method
Nonlinear Stochastic Optimization by the Monte-Carlo Method
 
Lecture 1 sapienza 2017
Lecture 1 sapienza 2017Lecture 1 sapienza 2017
Lecture 1 sapienza 2017
 
Analisis Korespondensi
Analisis KorespondensiAnalisis Korespondensi
Analisis Korespondensi
 
Rdnd2008
Rdnd2008Rdnd2008
Rdnd2008
 
Adc
AdcAdc
Adc
 
Discrete form of the riccati equation
Discrete form of the riccati equationDiscrete form of the riccati equation
Discrete form of the riccati equation
 
Stochastic Approximation and Simulated Annealing
Stochastic Approximation and Simulated AnnealingStochastic Approximation and Simulated Annealing
Stochastic Approximation and Simulated Annealing
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Science
 

Viewers also liked (11)

Spark MLlib - Training Material
Spark MLlib - Training Material Spark MLlib - Training Material
Spark MLlib - Training Material
 
Newton rapson codigos
Newton rapson codigosNewton rapson codigos
Newton rapson codigos
 
Skiena algorithm 2007 lecture10 graph data strctures
Skiena algorithm 2007 lecture10 graph data strcturesSkiena algorithm 2007 lecture10 graph data strctures
Skiena algorithm 2007 lecture10 graph data strctures
 
Newton method based iterative learning control for nonlinear systems
Newton method based iterative learning control for nonlinear systemsNewton method based iterative learning control for nonlinear systems
Newton method based iterative learning control for nonlinear systems
 
METHOD OF JACOBI
METHOD OF JACOBIMETHOD OF JACOBI
METHOD OF JACOBI
 
Linear Systems Gauss Seidel
Linear Systems   Gauss SeidelLinear Systems   Gauss Seidel
Linear Systems Gauss Seidel
 
newton raphson method
newton raphson methodnewton raphson method
newton raphson method
 
Newton raphson
Newton raphsonNewton raphson
Newton raphson
 
Newton-Raphson Method
Newton-Raphson MethodNewton-Raphson Method
Newton-Raphson Method
 
Newton Raphson method for load flow analysis
Newton Raphson method for load flow analysisNewton Raphson method for load flow analysis
Newton Raphson method for load flow analysis
 
Roots of Nonlinear Equations - Open Methods
Roots of Nonlinear Equations - Open MethodsRoots of Nonlinear Equations - Open Methods
Roots of Nonlinear Equations - Open Methods
 

Similar to 02 newton-raphson

Lecture on solving1
Lecture on solving1Lecture on solving1
Lecture on solving1
NBER
 
Exchange confirm
Exchange confirmExchange confirm
Exchange confirm
NBER
 
Deep Learning Opening Workshop - ProxSARAH Algorithms for Stochastic Composit...
Deep Learning Opening Workshop - ProxSARAH Algorithms for Stochastic Composit...Deep Learning Opening Workshop - ProxSARAH Algorithms for Stochastic Composit...
Deep Learning Opening Workshop - ProxSARAH Algorithms for Stochastic Composit...
The Statistical and Applied Mathematical Sciences Institute
 
Randomness conductors
Randomness conductorsRandomness conductors
Randomness conductors
wtyru1989
 
tensor-decomposition
tensor-decompositiontensor-decomposition
tensor-decomposition
Kenta Oono
 
Lecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inferenceLecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inference
asimnawaz54
 

Similar to 02 newton-raphson (20)

Lecture on solving1
Lecture on solving1Lecture on solving1
Lecture on solving1
 
Exchange confirm
Exchange confirmExchange confirm
Exchange confirm
 
Normal
NormalNormal
Normal
 
B. Sazdovic - Noncommutativity and T-duality
B. Sazdovic - Noncommutativity and T-dualityB. Sazdovic - Noncommutativity and T-duality
B. Sazdovic - Noncommutativity and T-duality
 
Maximum likelihood estimation of regularisation parameters in inverse problem...
Maximum likelihood estimation of regularisation parameters in inverse problem...Maximum likelihood estimation of regularisation parameters in inverse problem...
Maximum likelihood estimation of regularisation parameters in inverse problem...
 
Deep Learning Opening Workshop - ProxSARAH Algorithms for Stochastic Composit...
Deep Learning Opening Workshop - ProxSARAH Algorithms for Stochastic Composit...Deep Learning Opening Workshop - ProxSARAH Algorithms for Stochastic Composit...
Deep Learning Opening Workshop - ProxSARAH Algorithms for Stochastic Composit...
 
Divergence clustering
Divergence clusteringDivergence clustering
Divergence clustering
 
Kinks & Defects
Kinks & DefectsKinks & Defects
Kinks & Defects
 
Coordinate sampler: A non-reversible Gibbs-like sampler
Coordinate sampler: A non-reversible Gibbs-like samplerCoordinate sampler: A non-reversible Gibbs-like sampler
Coordinate sampler: A non-reversible Gibbs-like sampler
 
Randomness conductors
Randomness conductorsRandomness conductors
Randomness conductors
 
Nonconvex Compressed Sensing with the Sum-of-Squares Method
Nonconvex Compressed Sensing with the Sum-of-Squares MethodNonconvex Compressed Sensing with the Sum-of-Squares Method
Nonconvex Compressed Sensing with the Sum-of-Squares Method
 
Talk at CIRM on Poisson equation and debiasing techniques
Talk at CIRM on Poisson equation and debiasing techniquesTalk at CIRM on Poisson equation and debiasing techniques
Talk at CIRM on Poisson equation and debiasing techniques
 
cswiercz-general-presentation
cswiercz-general-presentationcswiercz-general-presentation
cswiercz-general-presentation
 
Kernel based models for geo- and environmental sciences- Alexei Pozdnoukhov –...
Kernel based models for geo- and environmental sciences- Alexei Pozdnoukhov –...Kernel based models for geo- and environmental sciences- Alexei Pozdnoukhov –...
Kernel based models for geo- and environmental sciences- Alexei Pozdnoukhov –...
 
MUMS: Bayesian, Fiducial, and Frequentist Conference - Model Selection in the...
MUMS: Bayesian, Fiducial, and Frequentist Conference - Model Selection in the...MUMS: Bayesian, Fiducial, and Frequentist Conference - Model Selection in the...
MUMS: Bayesian, Fiducial, and Frequentist Conference - Model Selection in the...
 
2 random variables notes 2p3
2 random variables notes 2p32 random variables notes 2p3
2 random variables notes 2p3
 
tensor-decomposition
tensor-decompositiontensor-decomposition
tensor-decomposition
 
The Holographic Cotton Tensor
The Holographic Cotton TensorThe Holographic Cotton Tensor
The Holographic Cotton Tensor
 
Lecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inferenceLecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inference
 
Matrix Models of 2D String Theory in Non-trivial Backgrounds
Matrix Models of 2D String Theory in Non-trivial BackgroundsMatrix Models of 2D String Theory in Non-trivial Backgrounds
Matrix Models of 2D String Theory in Non-trivial Backgrounds
 

Recently uploaded

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Krashi Coaching
 

Recently uploaded (20)

fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 

02 newton-raphson

  • 1. Quiescent Steady State (DC) Analysis The Newton-Raphson Method J. Roychowdhury, University of California at Berkeley Slide 1
  • 2. Solving the System's DAEs d ~ (~ (t)) + f (~ (t)) + ~ = ~ q x ~ x b(t) 0 dt ● DAEs: many types of solutions useful ● DC steady state: no time variations state ● transient: ckt. waveforms changing with time transient ● periodic steady state: changes periodic w time ➔ linear(ized): all sinusoidal waveforms: AC analysis ➔ nonlinear steady state: shooting, harmonic balance shooting ● noise analysis: random/stochastic waveforms analysis ● sensitivity analysis: effects of changes in circuit analysis parameters J. Roychowdhury, University of California at Berkeley Slide 2
  • 3. QSS: Quiescent Steady State (“DC”) Analysis d ~ (~ (t)) + f (~ (t)) + ~ = ~ q x ~ x b(t) 0 dt ● Assumption: nothing changes with time ● x, b are constant vectors; d/dt term vanishes ~ (~ ) 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 equations ➔ the problem: solving them numerically ➔ most common/useful technique: Newton-Raphson method J. Roychowdhury, University of California at Berkeley Slide 3
  • 4. The Newton Raphson Method ● Iterative numerical algorithm to solve ~ (~ ) = ~ g x 0 1 start with some guess for the solution 2 repeat a check if current guess solves equation i if yes: done! ii if no: do something to update/improve the guess ● Newton-Raphson algorithm ● start with initial guess ~ 0 ; i=0 x ● repeat until “convergence” (or max #iterations) d~ (~ i ) g x ➔ compute Jacobian matrix: Ji = d~x ➔ solve for update ±~ : Ji ±~ = ¡~ (~ i ) x x g x ➔ ➔ update guess: ~ i+1 = ~ i + ±~ x x x ➔ i++; J. Roychowdhury, University of California at Berkeley Slide 4
  • 5. Newton-Raphson Graphically g(x) ● Scalar case above ● Key property: generalizes to vector case J. Roychowdhury, University of California at Berkeley Slide 5
  • 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 6
  • 7. NR: Convergence Rate ● Key property of NR: quadratic convergence ¤ ● Suppose x is the exact solution of g(x) = 0 ● At the i th NR iteration, define the error ²i = xi ¡ x¤ ● meaning of quadratic convergence: ²i+1 < c²2 i ● (where c is a constant) ● NR's quadratic convergence properties ➔ if g(x) is smooth (at least continuous 1st and 2nd derivatives) ➔ and g 0 (x¤ ) 6= 0 ➔ and kxi ¡ x¤ k is small enough, then: ➔ NR features quadratic convergence J. Roychowdhury, University of California at Berkeley Slide 7
  • 8. Convergence Rate in Digits of Accuracy Quadratic convergence Linear convergence J. Roychowdhury, University of California at Berkeley Slide 8
  • 9. NR: Convergence Strategies ● reltol-abstol on deltax ● stop if norm(deltax) <= tolerance ➔ tolerance = 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 k~ (~ )k < ²residual g x ● Combinations of deltax and residual ● ultimately: heuristics, tuned to application J. Roychowdhury, University of California at Berkeley Slide 9
  • 10. Newton Raphson Update Step ● Need to solve linear matrix equation ● J ¢~ = ¡~ (~ ) : Ax = b problem x g x d~ (~ ) g x ● J= : Jacobian matrix d~x ● Derivatives of vector functions 2 3 2 3 x1 g1 (x1 ; ¢ ¢ ¢ ; xn ) 6 . 7 6 7 ● If ~ (t) = 4 . 5 ; x . ~ (~ ) = 4 g x . . . 5 xn g1 (x1 ; ¢ ¢ ¢ ; xn ) 2 dg1 dg1 dg1 dg1 3 dx1 dx2 ¢¢¢ dxn¡1 dxn 6 dg2 dg2 dg2 dg2 7 6 ¢¢¢ 7 d~ g 6 dx1 dx2 dxn¡1 dxn 7 6 . . . . 7 ● … then ,6 . . ¢¢¢ . . 7 x 6 dg . d~ . . . 7 6 n¡1 dgn¡1 ¢¢¢ dgn¡1 dgn¡1 7 4 dx1 dx2 dxn¡1 dxn 5 dgn dgn dgn dgn dx1 dx2 ¢¢¢ dxn¡1 dxn J. Roychowdhury, University of California at Berkeley Slide 10
  • 11. DAE Jacobian Matrices 1 ° 2 ° d ● Ckt DAE: ~ (~ (t)) + f (~ (t)) + ~ = ~ q x ~ x b(t) 0 iE dt iL 2 3 2 2 3 3 2 3 e1 (t) 0 ¡diode(¡e1 ; IS ; Vt ) ¡ iE 0 6 e2 (t) 7 6 Ce2 7 6 0 7 ~ (t) = 6 7 ~(~ ) = 6 7 f (~ ) = 6 iE + iL + e2 7~ 7 b(t) = 6 7 x 4 iL (t) 5 q x 4 0 5 ~x 6 4 e2 ¡ e1 R 5 4¡E(t)5 iE (t) ¡LiL e2 0 2 3 2 ddiode 3 0 0 0 0 dv (¡e1 ) 0 0 ¡1 d~ q 60 C 0 07 ~ 6 df 0 1 1 17 Jq , =6 40 7 Jf , =6 R 7 d~ x 0 0 05 d~ x 4 ¡1 1 0 05 0 0 ¡L 0 0 1 0 0 J. Roychowdhury, University of California at Berkeley Slide 11
  • 12. Newton Raphson: Computation ● Need to solve linear matrix equation ● J ¢~ = ¡~ (~ ) : Ax = b problem x g x ● Ax=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 sparse J. Roychowdhury, University of California at Berkeley Slide 12
  • 13. Dense vs Sparse Matrices ● Sparse Jacobians: typically 3N-4N non-zeros ● compare against N2 for dense J. Roychowdhury, University of California at Berkeley Slide 13