Presentation is loading. Please wait.

Presentation is loading. Please wait.

Solutions for Nonlinear Equations

Similar presentations


Presentation on theme: "Solutions for Nonlinear Equations"— Presentation transcript:

1 Solutions for Nonlinear Equations
Lecture 8 Alessandra Nardi Thanks to Prof. Newton, Prof. Sangiovanni, Prof. White, Jaime Peraire, Deepak Ramaswamy, Michal Rewienski, and Karen Veroy

2 Last Lecture Review How to represent circuits
MNA Voltage sources How to assemble, X-stamp How to solve linear systems Gaussian elimination LU decomposition

3 Outline Nonlinear problems Iterative Methods Newton’s Method
Derivation of Newton Quadratic Convergence Examples Convergence Testing Multidimensonal Newton Method Basic Algorithm Quadratic convergence Application to circuits

4 Nonlinear Problems - Example
1 Ir I1 Id Need to Solve

5 Nonlinear Equations Given g(V)=I It can be expressed as: f(V)=g(V)-I
 Solve g(V)=I equivalent to solve f(V)=0 Hard to find analytical solution for f(x)=0 Solve iteratively

6 Nonlinear Equations – Iterative Methods
Start from an initial value x0 Generate a sequence of iterate xn-1, xn, xn+1 which hopefully converges to the solution x* Iterates are generated according to an iteration function F: xn+1=F(xn) Ask When does it converge to correct solution ? What is the convergence rate ?

7 Newton-Raphson (NR) Method
Consists of linearizing the system. Want to solve f(x)=0  Replace f(x) with its linearized version and solve. Note: at each step need to evaluate f and f’

8 Newton-Raphson Method – Graphical View

9 Newton-Raphson Method – Algorithm
Define iteration Do k = 0 to …. until convergence How about convergence? An iteration {x(k)} is said to converge with order q if there exists a vector norm such that for each k  N:

10 Newton-Raphson Method – Convergence
Mean Value theorem truncates Taylor series But by Newton definition

11 Newton-Raphson Method – Convergence
Subtracting Dividing through Convergence is quadratic

12 Newton-Raphson Method – Convergence
Local Convergence Theorem If Then Newton’s method converges given a sufficiently close initial guess (and convergence is quadratic)

13 Newton-Raphson Method – Convergence Example 1
Convergence is quadratic

14 Newton-Raphson Method – Convergence Example 2
Note : not bounded away from zero Convergence is linear

15 Newton-Raphson Method – Convergence Example 1, 2

16 Newton-Raphson Method – Convergence

17 Newton-Raphson Method – Convergence Convergence Checks
f(x) X

18 Newton-Raphson Method – Convergence Convergence Checks
X f(x)

19 Newton-Raphson Method – Convergence
demo2

20 Newton-Raphson Method – Convergence Local Convergence
Convergence Depends on a Good Initial Guess f(x) X

21 Newton-Raphson Method – Convergence Local Convergence
Convergence Depends on a Good Initial Guess

22 Nonlinear Problems – Multidimensional Example
Nodal Analysis + - + + - - Nonlinear Resistors Two coupled nonlinear equations in two unknowns

23 Multidimensional Newton Method

24 Multidimensional Newton Method Computational Aspects
Each iteration requires: Evaluation of F(xk) Computation of J(xk) Solution of a linear system of algebraic equations whose coefficient matrix is J(xk) and whose RHS is -F(xk)

25 Multidimensional Newton Method Algorithm

26 Multidimensional Newton Method Convergence
Local Convergence Theorem If Then Newton’s method converges given a sufficiently close initial guess (and convergence is quadratic)

27 Application of NR to Circuit Equations
1 Ir I1 Id

28 Application of NR to Circuit Equations Companion Network – MNA templates
Note: G0 and Id depend on the iteration count k  G0=G0(k) and Id=Id(k)

29 Application of NR to Circuit Equations Companion Network – MNA templates

30 Modeling a MOSFET (MOS Level 1, linear regime)

31 Modeling a MOSFET (MOS Level 1, linear regime)

32 Modeling a MOSFET Need continuous models with continuous derivatives
Example: simple MOS model valid from weak inversion to saturation

33 DC Analysis Flow Diagram
For each state variable in the system

34 Implications Device model equations must be continuous with continuous derivatives and derivative calculation must be accurate derivative of function (not all models do this - Poor diode models and breakdown models don’t - be sure models are decent - beware of user-supplied models) Watch out for floating nodes (If a node becomes disconnected, then J(x) is singular) Give good initial guess for x(0) Most model computations produce errors in function values and derivatives. Want to have convergence criteria || x(k+1) - x(k) || <  such that  > than model errors.

35 Summary Nonlinear problems Iterative Methods Newton’s Method
Derivation of Newton Quadratic Convergence Examples Convergence Testing Multidimensional Newton Method Basic Algorithm Quadratic convergence Application to circuits

36 Methods for Ordinary Differential Equations
Lecture 10 Alessandra Nardi Thanks to Prof. Jacob White, Deepak Ramaswamy Jaime Peraire, Michal Rewienski, and Karen Veroy

37 Outline Transient Analysis of dynamical circuits Examples
i.e., circuits containing C and/or L Examples Solution of Ordinary Differential Equations (Initial Value Problems – IVP) Forward Euler (FE), Backward Euler (BE) and Trapezoidal Rule (TR) Multistep methods Convergence

38 Application Problems Signal Transmission in an Integrated Circuit
Signal Wire Wire has resistance Wire and ground plane form a capacitor Logic Gate Logic Gate Ground Plane Metal Wires carry signals from gate to gate. How long is the signal delayed?

39 Application Problems Signal Transmission in an IC – Circuit Model
capacitor resistor Constructing the Model Cut the wire into sections. Model wire resistance with resistors. Model wire-plane capacitance with capacitors.

40 Application Problems Signal Transmission in an IC – 2x2 example
Constitutive Equations Conservation Laws R2 C1 R1 R3 C2 Nodal Equations Yields 2x2 System

41 Application Problems Signal Transmission in an IC – 2x2 example
Notice two time scale behavior v1 and v2 come together quickly (fast eigenmode). v1 and v2 decay to zero slowly (slow eigenmode).

42 Circuit Equation Formulation
For dynamical circuits equations can be written compactly: For sake of simplicity, we shall discuss first order ODEs in the form:

43 Ordinary Differential Equations Initial Value Problems (IVP)
Typically analytic solutions are not available  solve it numerically

44 Ordinary Differential Equations Assumptions and Simplifications
Not necessarily a solution exists and is unique for: It turns out that, under rather mild conditions on the continuity and differentiability of F, it can be proven that there exists a unique solution. Also, for sake of simplicity only consider linear case: We shall assume that has a unique solution

45 Finite Difference Methods Basic Concepts
First - Discretize Time Second - Represent x(t) using values at ti Approx. sol’n Exact Third - Approximate using the discrete

46 Finite Difference Methods Forward Euler Approximation

47 Finite Difference Methods Forward Euler Algorithm

48 Finite Difference Methods Backward Euler Approximation

49 Finite Difference Methods Backward Euler Algorithm
Solve with Gaussian Elimination

50 Finite Difference Methods Trapezoidal Rule Approximation

51 Finite Difference Methods Trapezoidal Rule Algorithm
Solve with Gaussian Elimination

52 Finite Difference Methods Numerical Integration View
Trap BE FE

53 Finite Difference Methods Summary of Basic Concepts
Trap Rule, Forward-Euler, Backward-Euler Are all one-step methods Forward-Euler is simplest No equation solution explicit method. Boxcar approximation to integral Backward-Euler is more expensive Equation solution each step implicit method Trapezoidal Rule might be more accurate Trapezoidal approximation to integral

54 Convergence Analysis Convergence Definition
Definition: A finite-difference method for solving initial value problems on [0,T] is said to be convergent if given any A and any initial condition

55 Convergence Analysis Order-p Convergence
Definition: A multi-step method for solving initial value problems on [0,T] is said to be order p convergent if given any A and any initial condition Forward- and Backward-Euler are order 1 convergent Trapezoidal Rule is order 2 convergent

56 Multistep Methods – Convergence Analysis Two types of error

57 Multistep Methods – Convergence Analysis Two conditions for Convergence
For convergence we need to look at max error over the whole time interval [0,T] We look at GTE Not enough to look at LTE, in fact: As I take smaller and smaller timesteps Dt, I would like my solution to approach exact solution better and better over the whole time interval, even though I have to add up LTE from more timesteps.

58 Multistep Methods – Convergence Analysis Two conditions for Convergence
1) Local Condition: One step errors are small (consistency) Typically verified using Taylor Series 2) Global Condition: The single step errors do not grow too quickly (stability) All one-step methods are stable in this sense.

59 One-step Methods – Convergence Analysis Consistency definition
Definition: A one-step method for solving initial value problems on an interval [0,T] is said to be consistent if for any A and any initial condition

60 One-step Methods – Convergence Analysis Consistency for Forward Euler
Proves the theorem if derivatives of x are bounded

61 One-step Methods – Convergence Analysis Convergence Analysis for Forward Euler

62 One-step Methods – Convergence Analysis Convergence Analysis for Forward Euler

63 Example + - I1 R C V2 VS V1 BE FE

64 Conclusions Introduced basic non-linear equation solution techniques
How to get good initial points? Is it efficient? Introduced basic differential eqns solution techniques Stability? How to choose time-step Stiffness Other methods?


Download ppt "Solutions for Nonlinear Equations"

Similar presentations


Ads by Google