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

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 

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