Spline Interpolation Method Major All Engineering Majors Authors

  • Slides: 31
Download presentation
Spline Interpolation Method Major: All Engineering Majors Authors: Autar Kaw, Jai Paul http: //numericalmethods.

Spline Interpolation Method Major: All Engineering Majors Authors: Autar Kaw, Jai Paul http: //numericalmethods. eng. usf. edu Transforming Numerical Methods Education for STEM Undergraduates http: //numericalmethods. eng. usf. edu 1

Spline Method of Interpolation http: //numericalmethods. eng. usf. edu

Spline Method of Interpolation http: //numericalmethods. eng. usf. edu

What is Interpolation ? Given (x 0, y 0), (x 1, y 1), ……

What is Interpolation ? Given (x 0, y 0), (x 1, y 1), …… (xn, yn), find the value of ‘y’ at a value of ‘x’ that is not given. 3 lmethods. eng. usf. edu http: //numerica

Interpolants Polynomials are the most common choice of interpolants because they are easy to:

Interpolants Polynomials are the most common choice of interpolants because they are easy to: Evaluate Differentiate, and Integrate. 4 lmethods. eng. usf. edu http: //numerica

Why Splines ? 5 lmethods. eng. usf. edu http: //numerica

Why Splines ? 5 lmethods. eng. usf. edu http: //numerica

Why Splines ? 6 Figure : Higher order polynomial interpolation is a bad ideahttp:

Why Splines ? 6 Figure : Higher order polynomial interpolation is a bad ideahttp: //numerica lmethods. eng. usf. edu

Linear Interpolation 7 lmethods. eng. usf. edu http: //numerica

Linear Interpolation 7 lmethods. eng. usf. edu http: //numerica

Linear Interpolation (contd) 8 lmethods. eng. usf. edu http: //numerica

Linear Interpolation (contd) 8 lmethods. eng. usf. edu http: //numerica

Example The upward velocity of a rocket is given as a function of time

Example The upward velocity of a rocket is given as a function of time in Table 1. Find the velocity at t=16 seconds using linear splines. Table Velocity as a function of time (s) 0 10 15 20 22. 5 30 9 (m/s) 0 227. 04 362. 78 517. 35 602. 97 901. 67 Figure. Velocity vs. time data for the rocket example lmethods. eng. usf. edu http: //numerica

Linear Interpolation 10 lmethods. eng. usf. edu http: //numerica

Linear Interpolation 10 lmethods. eng. usf. edu http: //numerica

Quadratic Interpolation 11 lmethods. eng. usf. edu http: //numerica

Quadratic Interpolation 11 lmethods. eng. usf. edu http: //numerica

Quadratic Interpolation (contd) 12 lmethods. eng. usf. edu http: //numerica

Quadratic Interpolation (contd) 12 lmethods. eng. usf. edu http: //numerica

Quadratic Splines (contd) 13 lmethods. eng. usf. edu http: //numerica

Quadratic Splines (contd) 13 lmethods. eng. usf. edu http: //numerica

Quadratic Splines (contd) 14 lmethods. eng. usf. edu http: //numerica

Quadratic Splines (contd) 14 lmethods. eng. usf. edu http: //numerica

Quadratic Splines (contd) 15 lmethods. eng. usf. edu http: //numerica

Quadratic Splines (contd) 15 lmethods. eng. usf. edu http: //numerica

Quadratic Spline Example The upward velocity of a rocket is given as a function

Quadratic Spline Example The upward velocity of a rocket is given as a function of time. Using quadratic splines a) Find the velocity at t=16 seconds b) Find the acceleration at t=16 seconds c) Find the distance covered between t=11 and t=16 seconds Table Velocity as a function of time (s) 0 10 15 20 22. 5 30 16 (m/s) 0 227. 04 362. 78 517. 35 602. 97 901. 67 Figure. Velocity vs. time data for the rocket example lmethods. eng. usf. edu http: //numerica

Solution Let us set up the equations 17 lmethods. eng. usf. edu http: //numerica

Solution Let us set up the equations 17 lmethods. eng. usf. edu http: //numerica

Each Spline Goes Through Two Consecutive Data Points 18 lmethods. eng. usf. edu http:

Each Spline Goes Through Two Consecutive Data Points 18 lmethods. eng. usf. edu http: //numerica

Each Spline Goes Through Two Consecutive Data Points 19 t s 0 10 v(t)

Each Spline Goes Through Two Consecutive Data Points 19 t s 0 10 v(t) m/s 0 227. 04 15 20 22. 5 30 362. 78 517. 35 602. 97 901. 67 lmethods. eng. usf. edu http: //numerica

Derivatives are Continuous at Interior Data Points 20 lmethods. eng. usf. edu http: //numerica

Derivatives are Continuous at Interior Data Points 20 lmethods. eng. usf. edu http: //numerica

Derivatives are continuous at Interior Data Points At t=10 At t=15 At t=20 At

Derivatives are continuous at Interior Data Points At t=10 At t=15 At t=20 At t=22. 5 21 lmethods. eng. usf. edu http: //numerica

Last Equation 22 lmethods. eng. usf. edu http: //numerica

Last Equation 22 lmethods. eng. usf. edu http: //numerica

Final Set of Equations 23 lmethods. eng. usf. edu http: //numerica

Final Set of Equations 23 lmethods. eng. usf. edu http: //numerica

Coefficients of Spline 24 i ai bi ci 1 0 22. 704 0 2

Coefficients of Spline 24 i ai bi ci 1 0 22. 704 0 2 0. 8888 4. 928 88. 88 3 − 0. 1356 35. 66 − 141. 61 4 1. 6048 5 0. 20889 − 33. 956 554. 55 28. 86 − 152. 13 lmethods. eng. usf. edu http: //numerica

Quadratic Spline Interpolation Part 2 of 2 http: //numericalmethods. eng. usf. edu 25 lmethods.

Quadratic Spline Interpolation Part 2 of 2 http: //numericalmethods. eng. usf. edu 25 lmethods. eng. usf. edu http: //numerica

Final Solution 26 lmethods. eng. usf. edu http: //numerica

Final Solution 26 lmethods. eng. usf. edu http: //numerica

Velocity at a Particular Point a) Velocity at t=16 27 lmethods. eng. usf. edu

Velocity at a Particular Point a) Velocity at t=16 27 lmethods. eng. usf. edu http: //numerica

Acceleration from Velocity Profile b) The quadratic spline valid at t=16 is given by

Acceleration from Velocity Profile b) The quadratic spline valid at t=16 is given by 28 lmethods. eng. usf. edu http: //numerica

Distance from Velocity Profile c) Find the distance covered by the rocket from t=11

Distance from Velocity Profile c) Find the distance covered by the rocket from t=11 s to t=16 s. 29 lmethods. eng. usf. edu http: //numerica

Additional Resources For all resources on this topic such as digital audiovisual lectures, primers,

Additional Resources For all resources on this topic such as digital audiovisual lectures, primers, textbook chapters, multiple-choice tests, worksheets in MATLAB, MATHEMATICA, Math. Cad and MAPLE, blogs, related physical problems, please visit http: //numericalmethods. eng. usf. edu/topics/spline_met hod. html

THE END http: //numericalmethods. eng. usf. edu

THE END http: //numericalmethods. eng. usf. edu