MATLAB Simulation Numerical Integration Dr. I.Fletcher School of Computing & Technology University of Sunderland.

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
SOLUTION OF STATE EQUATION
CE33500 – Computational Methods in Civil Engineering Differentiation Provided by : Shahab Afshari
Error Measurement and Iterative Methods
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Ordinary Differential Equations Equations which are.
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5 Numerical Integration Spring 2010 Prof. Chung-Kuan Cheng 1.
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
SE207 Modeling and Simulation Lab # 3: Analog Simulation of a First Order System (RC circuit)
Numerical Integration CSE245 Lecture Notes. Content Introduction Linear Multistep Formulae Local Error and The Order of Integration Time Domain Solution.
Constrained Fitting Calculation the rate constants for a consecutive reaction with known spectrum of the reactant A = (A A + A B + A C ) + R = C E T =
Initial-Value Problems
Part 3 Truncation Errors.
Dr. Jie Zou PHY Chapter 9 Ordinary Differential Equations: Initial-Value Problems Lecture (II) 1 1 Besides the main textbook, also see Ref.: “Applied.
Numerical Solutions of Ordinary Differential Equations
NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS
Fin500J Topic 7Fall 2010 Olin Business School 1 Fin500J Mathematical Foundations in Finance Topic 7: Numerical Methods for Solving Ordinary Differential.
PART 7 Ordinary Differential Equations ODEs
Numerical Solutions to ODEs Nancy Griffeth January 14, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Boyce/DiPrima 9th ed, Ch 8.4: Multistep Methods Elementary Differential Equations and Boundary Value Problems, 9th edition, by William E. Boyce and Richard.
09/16/2010© 2010 NTUST Today Course overview and information.
Time Domain Representation of Linear Time Invariant (LTI).
Time-Domain Representations of LTI Systems
NUMERICAL ERROR Student Notes ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier.
Numerical Methods for Solving ODEs Euler Method. Ordinary Differential Equations  A differential equation is an equation in which includes derivatives.
+ Numerical Integration Techniques A Brief Introduction By Kai Zhao January, 2011.
Pyramidal Implementation of Lucas Kanade Feature Tracker Jia Huang Xiaoyan Liu Han Xin Yizhen Tan.
Control Systems With Embedded Implementation (CSEI)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 7 - Chapter 25.
Komputasi Numerik: Integrasi dan Differensiasi Numerik Agus Naba Physics Dept., FMIPA-UB.
Hirophysics.com RC Circuits and its Physical Simulation Richard Robbins.
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.
Dr. Mujahed AlDhaifallah ( Term 342)
DIFFERENTIAL EQUATIONS Note: Differential equations are equations containing a derivative. They can be solved by integration to obtain a general solution.
Today’s class Ordinary Differential Equations Runge-Kutta Methods
Linear Constant-Coefficient Difference Equations
Ordinary Differential Equations
ACSL, POSTECH1 MATLAB 입문 CHAPTER 8 Numerical Calculus and 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.
NUMERICAL DIFFERENTIATION or DIFFERENCE APPROXIMATION Used to evaluate derivatives of a function using the functional values at grid points. They are.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
Linear Constant-Coefficient Difference Equations
Part 7 - Chapter 25.
Ordinary Differential Equations
Prepared by Vince Zaccone
Chapter 22.
Chapter 2 Interconnect Analysis
CSE245: Computer-Aided Circuit Simulation and Verification
Class Notes 18: Numerical Methods (1/2)
Solve the equation for x. {image}
Maclaurin and Taylor Series.
Sec 21: Analysis of the Euler Method
Part 7 - Chapter 25.
Numerical Integration:
Chapter 2 Systems Defined by Differential or Difference Equations
CSE245: Computer-Aided Circuit Simulation and Verification
Homework 1: Electrical System
Numerical Analysis Lecture 37.
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L2.
5.3 Higher-Order Taylor Methods
Numerical solution of first-order ordinary differential equations
Mathematical Models of Control Systems
Numerical solution of first-order ordinary differential equations 1. First order Runge-Kutta method (Euler’s method) Let’s start with the Taylor series.
Modeling and Simulation: Exploring Dynamic System Behaviour
Presentation transcript:

MATLAB Simulation Numerical Integration Dr. I.Fletcher School of Computing & Technology University of Sunderland

Why Integrate ? Within continuous-time simulation the use of Differential Equation Models is predominant. As simulation requires the solving of such equations then the inverse operator to the derivative function is required, Integration.

What is Integration ? time y(t) = f(t) The Area under the Curve !

How is it performed ? time f(t)f(t+h) h y(t) = f(t) y(t) 

Via the Taylor Series expansion : the derivative over the integration time step can be shown to be which involves the evaluation of an infinite number of differential coefficients at each time step. Taylor Series

Euler Integration The simplest of all approaches it involves the truncation of the previously derived Taylor series to the 1st derivative, i.e.

Euler Schematic time y(t) y(t+h) h (dt) y(t) = f(t) dy(t)/dt dy(t)

Euler Implementation Procedure Step 1 :Evaluate the derivative(s) numerically from the conditions at the start of the integration time step and system constants. Step 2 :Solve the derivative(s) using the Euler equation Step 3 :Repeat steps 1 & 2 until the simulation end time, tend, is reached

Example : Series RC LPF Consider the RC LPF network and assume that RC = 1 second and that the output is initially zero volts ( that is the capacitor is initially uncharged ), then By using an integration time step of 0.1 seconds the systems response to a unit step can be calculated via

Example : Series RC LPF TimeVin (t)Vo (t)dVo (t)/dt 01[0]1 - 0 = *1 = = Etc… Unit Step

Example 1 : Series RC LPF time Output Voltage h = 1 h = 0.5 h = 0.2 h = 0.1 Actual Key :

Euler-Cauchy Integration time y(t)y(t+h) h y(t) = f(t) y e (t)  t t+h t+h/2 dy(t)/dt dy e (t)/dt Equivalent to Truncation of Taylor Series to the second derivative !

Euler – Cauchy Procedure Step 1 : Evaluate the derivative(s) numerically from the conditions at the start of the integration time step and system constants. Step 2 : Solve the derivative(s) using the Euler equation to obtain the first estimate of the output(s) Step 3 : Use this estimate of the output(s) to re-determine the derivative(s) from the original equations Step 4 : Evaluate the next output(s) via the equation Step 5 : Repeat the above steps until the simulation end time

Example : Series RC LPF t = 0 : Vo(0) = [0], t = 0.1 : dVo(0) = 1 – [0] = 1, Ve (1) = [0] + 0.1*1 = 0.1, dVe(1) = = 0.9, Vo (1) = [0]+0.1(1+0.9)/2 = t = 0.2 : dVo(0) = = 0.905, Ve (1) = *0.905 = , dVe (1) = = , Vo (1) = ( )/2 = etc....

Euler-Cauchy Accuracy time Simulation Error Euler-Cauchy Euler h = 0.1 h = 0.2 h = 0.5 h = 0.1 h = 0.2 h = 0.5

In Conclusion Numerical Integration requires the following decisions to be made to achieve the best accuracy/simulation time trade off : Time Step Selection : Too small large simulation time/memory To LargeInaccuracy/possible instability Integration Method : Low orderGreater Errors High OrderComputational Effort