Modeling and Simulation: Exploring Dynamic System Behaviour

Slides:



Advertisements
Similar presentations
Example Project and Numerical Integration Computational Neuroscience 03 Lecture 11.
Advertisements

Formal Computational Skills
Ordinary Differential Equations
Chapter 6 Differential Equations
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L8&9 KFUPM.
Computational Modeling for Engineering MECN 6040
PART 7 Ordinary Differential Equations ODEs
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Ordinary Differential Equations Equations which are.
Numerical Integration CSE245 Lecture Notes. Content Introduction Linear Multistep Formulae Local Error and The Order of Integration Time Domain Solution.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 31 Ordinary Differential Equations.
Numerical Solutions of Ordinary Differential Equations
NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS
Differential Equations and Boundary Value Problems
1 Chapter 6 Numerical Methods for Ordinary Differential Equations.
PART 7 Ordinary Differential Equations ODEs
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Lecture 35 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
EE3561_Unit 8Al-Dhaifallah14351 EE 3561 : Computational Methods Unit 8 Solution of Ordinary Differential Equations Lesson 3: Midpoint and Heun’s Predictor.
1 EEE 431 Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu
Integration of 3-body encounter. Figure taken from
Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation.
Engineering Analysis – Computational Fluid Dynamics –
Scientific Computing Multi-Step and Predictor-Corrector Methods.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 7 - Chapter 25.
Numerical Analysis. Numerical Analysis or Scientific Computing Concerned with design and analysis of algorithms for solving mathematical problems that.
Ch 8.2: Improvements on the Euler Method Consider the initial value problem y' = f (t, y), y(t 0 ) = y 0, with solution  (t). For many problems, Euler’s.
Today’s class Ordinary Differential Equations Runge-Kutta Methods
Lecture 40 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
ECE 576 – Power System Dynamics and Stability Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Ordinary Differential Equations
1/14  5.2 Euler’s Method Compute the approximations of y(t) at a set of ( usually equally-spaced ) mesh points a = t 0 < t 1
Lecture 39 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
NUMERICAL ANALYSIS I. Introduction Numerical analysis is concerned with the process by which mathematical problems are solved by the operations.
1 Week 11 Numerical methods for ODEs 1.The basics: finite differences, meshes 2.The Euler method.
Keywords (ordinary/partial) differencial equation ( 常 / 偏 ) 微分方程 difference equation 差分方程 initial-value problem 初值问题 convex 凸的 concave 凹的 perturbed problem.
Announcements Please read Chapters 11 and 12
Numerical Methods for Partial Differential Equations
Ordinary Differential Equations
Part 7 - Chapter 25.
Boyce/DiPrima 9th ed, Ch 2.7: Numerical Approximations: Euler’s Method Elementary Differential Equations and Boundary Value Problems, 9th edition, by.
Numerical Methods by Dr. Laila Fouad.
Ordinary Differential Equations
ECE 576 – Power System Dynamics and Stability
525602:Advanced Numerical Methods for ME
Interpolation.
Class Notes 18: Numerical Methods (1/2)
Numerical Solutions of Ordinary Differential Equations
Class Notes 19: Numerical Methods (2/2)
Ch 8.6: Systems of First Order Equations
Solution of Equations by Iteration
CSE 245: Computer Aided Circuit Simulation and Verification
Chapter 26.
Sec 21: Analysis of the Euler Method
Part 7 - Chapter 25.
Numerical Analysis Lecture 37.
Numerical Analysis Lecture 38.
topic4: Implicit method, Stability, ADI method
MATH 175: NUMERICAL ANALYSIS II
Introduction to Ordinary Differential Equations
ECE 576 POWER SYSTEM DYNAMICS AND STABILITY
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L3 KFUPM.
MATH 175: Numerical Analysis II
Ch5 Initial-Value Problems for ODE
topic4: Implicit method, Stability, ADI method
Differential equations
Numerical Analysis Lecture 36.
Modeling and Simulation: Exploring Dynamic System Behaviour
Presentation transcript:

Modeling and Simulation: Exploring Dynamic System Behaviour Chapter 8 Simulation with CTDS Models

Continuous Time Dynamic Models Synopsis Generating behavior (numerical sol’n of ode’s) Possible hazards on the road to successful solution of continuous M&S projects

CTDS Models Noteworthy Features CM is formulated as a set of differential equations (ode or pde) possibly augmented with a set of algebraic equations Frequently the SUI has its origins in the “physical world” hence behavior is governed by physical laws (physics, chemistry, heat transfer, etc); i.e., “deep knowledge” Optimization studies are straightforward because (a) random effects rarely present and (b) behavior is ”smooth” Time advance is not a separate issue because it is embedded in the equation solving mechanism

L q΄΄(t) + R q΄(t) + q(t)/C = E(t) Some Examples Electric Circuit (An example of a deductive model formulated from the application of physical laws) L q΄΄(t) + R q΄(t) + q(t)/C = E(t) Initial conditions: q(t0) and q΄(t0) are required

2. Population Dynamics (predator/prey). (An example of an inductive model that is formulated from arguments based on observation and intuition) without interaction: P1΄(t) = – α1 P1(t) P2΄(t) = α2 P2(t)

The Numerical Solution Process Concern here is with numerical procedures to solve the equation: x΄(t) = f(x(t), t) (*)   over the interval [t0 , tf ] where t0 , tf and x(t0) = x0 are assumed to be given (the IVP as opposed to the BVP)

Key issue --- are we trying to do the impossible (i. e Key issue --- are we trying to do the impossible (i.e., can we be sure a solution exists)?? Theorem Let f(x, t) satisfy the Lipschitz Condition and let x0 be any number. Then there exists exactly one function, x(t), with the following properties:   x(t) is continuous and differentiable for t  [t0 , tf]  (ii) x΄(t) = f(x(t), t) for t  [t0 , tf]  (iii) x(t0) = x0

Lipschitz Condition * f(x, t) is defined and continuous in the strip - ∞ < x < ∞ , t0 ≤ t ≤ tf with t0 and tf finite * there exists a constant, L, such that for any t  [ t0 , tf] and any two numbers α and β | f(α, t) - f(β, t) | ≤ L | α - β |  

What is a Numerical Solution of an IVP ? A numerical solution to an IVP is a finite set of points (ordered pairs): { (tn , xn): n = 0,1,2, ...... N}  where : ** xn is the generated numerical approximation for x(tn ) ** tn+1 = tn + hn ; 0 ≤ n ≤ (N-1) and tN = tf. [note reference here to “a” rather than “the”!]  

Numerical Solution to an IVP

Sources of Error a) truncation (or discretization) error ·  this is a property of the solution method · if all arithmetic operations could be performed with infinite precision, then this would be the only source of error b) round-off error ·  this is a property of the computer program used to implement the solution method ·  it arises because of the finite precision in number representation

Associated Issues * stability * order (this is closely related to the notion of truncation error introduced earlier) * accuracy (this is a reflection of the reliability of the results obtained) * local efficiency (this is a measure of the effort required to move the generated solution forward from t = tn to t = tn+1; it is typically measured in terms of the number of evaluations of the derivative function, f

The Euler Method * recall that the slope of the true solution through (tn, xn) is fn = f(xn, tn) *solution approximation for the Euler method at t = tn+1 is: xn+1 = xn + hn fn

Modified Euler Method (Trapazoidal Rule) ·       take an Euler step to produce the value pn+1 = (xn + hn fn) at t = tn+1 ·       let Fn+1 = f(pn+1, tn+1) ·       choose the solution estimate at t = tn+1 to be: xn+1 = xn + hn (fn + Fn+1)/2

Comparison of the Euler and Modified Euler Methods Observe that Euler Method yields a new solution value after one derivative function evaluation while the Modified Euler Method requires two. Is there any benefit from this extra effort?

Comparison of the Euler and Modified Euler Methods (cont.) Observe that Euler Method yields a new solution value after one derivative function evaluation while the Modified Euler Method requires two. Is there any benefit from this extra effort? Most definitely --- YES! From an analysis via Taylor Series expansion, it can be demonstrated that: x(tn+1) = xEn+1 + O(hn2) x(tn+1) = xMEn+1 + O(hn3)

The Runge-Kutta Family xn+1 = xn + h bi gi g1 = f(xn , tn) g2 = f(xn + h a21 g1 , tn + c2 h)   g3 = f(xn + h (a31 g1 + a32 g2), tn + c3 h) . . . gs = f(xn + h (as1 g1 + as2 g2 + .... as s-1 gs-1), tn + cs h)

The s-stage formula requires s evaluations of the derivative function, f, to advance one step along the t-axis  The s-stage formula has ŝ = (s2 + 3s - 2)/2 free parameters These are determined by requiring x(tn+1) = xn+1 + O(hnr) i.e., a formula of order r, where r ≤ s (typically r = s) Since ŝ > s, there are many s-stage formulas of order r

Linear Multi-step Methods The general representation for this broad class of methods is:   xn+1 = αi xn+1-i + h βi fn+1-i Special Cases: a)  if k = 1, then we have a single-step method if k > 1, then we have a multi-step method (solution values prior to tn are used in generating the solution value at tn+1)     b) if β0 ≠ 0, then we have an implicit/closed/corrector method if β0 = 0, then we have an explicit/open/predictor method

Predictor-Corrector Methods These represent the standard implementation approach for linear multi-step methods. The underlying idea is to first use an explicit formula to project forward (i.e. to “predict”) and then, as a second step, an implicit formula is used to create the solution value.   Example (Adams fourth-order predictor-corrector procedure) Predictor (Adams-Bashforth):   xn+1 = xn + h (55 fn – 59 fn-1 + 37 fn-2 – 9 f n-3 ) / 24  Corrector (Adams-Moulton) xn+1 = xn + h (9 ƒn+1 + 19 fn - 5 fn-1 + f n-2 ) / 24

Issues and Hazards Stability Stiffness Handling discontinuities Variable step-size