1 / 10

Integration Methods

Integration Methods. Euler Runge-Kutta 2 Runge-Kutta 4. Euler’s Method. Let Stock = X Let flow = f(t, X) [function of time, Stock] Compute X(t) from X(t-dt) and time. X = dt * f (t-dt, X(t-dt)) X(t) = X(t-dt) + X. Euler’s Method. Assume flow = f(t). Like Riemann sum.

jthor
Download Presentation

Integration Methods

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Integration Methods Euler Runge-Kutta 2 Runge-Kutta 4

  2. Euler’s Method • Let Stock = X • Let flow = f(t, X)[function of time, Stock] • Compute X(t) from X(t-dt) and time. • X = dt * f (t-dt, X(t-dt)) • X(t) = X(t-dt) + X

  3. Euler’s Method Assume flow = f(t). Like Riemann sum.

  4. Euler Integration Error • Error = X - area under flow curve Error =

  5. Runge-Kutta 2 • Let Stock = X, flow = f(t,X) • Estimates for stock updates: • F1 = dt * f(t-dt, X(t-dt)) • F2 = dt * f(t, X(t-dt) + F1) • X = ½ * (F1 + F2) • X(t) = X(t-dt) + X

  6. Runge-Kutta 2 Assume flow = f(t). Like Trapezoid Method.

  7. RK2 Integration Error • Error = X - area under flow curve Error =

  8. Runge-Kutta 4 • Let Stock = X, flow = f(t,X) • Estimates for stock updates: • F1 = dt * f(t-dt, X(t-dt)) • F2 = dt * f(t-½dt, X(t-dt) + ½*F1) • F3 = dt * f(t-½dt, X(t-dt) + ½*F2) • F4 = dt * f(t, X(t-dt) + F3) • X = 1/6 * (F1+2*F2+2*F3+F4) • X(t) = X(t-dt) + X

  9. Runge-Kutta 4 Assume flow = f(t). Like Simpson’s Method.

  10. RK2 and RK4 are more accurate for same dt than Euler RK2 and RK4 work well for continuous systems Euler works poorly for oscillatory systems RK2 and RK4 work poorly with logic values and integers RK2 and RK4 work poorly with discrete systems RK2 and RK4 work poorly with conveyors What Method to Use?

More Related