Interpolation.

Slides:



Advertisements
Similar presentations
Splines and Piecewise Interpolation
Advertisements

Class 7.2: Graphical Analysis and Excel Solving Problems Using Graphical Analysis.
Kinematics of simple harmonic motion (SHM)
Analog and digital data Skills: none IT concepts: analog to digital conversion, digital to analog conversion, sample rate, sample size, quality-file size.
©1999 BG Mobasseri 15/24/99 INTERPOLATION AND CURVE FITTING Etter: pp June 16, ‘99.
Physics 1.2.
MATH 685/ CSI 700/ OR 682 Lecture Notes
Chapter 18 Interpolation The Islamic University of Gaza
CITS2401 Computer Analysis & Visualisation
EARS1160 – Numerical Methods notes by G. Houseman
ES 240: Scientific and Engineering Computation. InterpolationPolynomial  Definition –a function f(x) that can be written as a finite series of power functions.
Curve-Fitting Interpolation
Curve-Fitting Regression
Linear Motion III Acceleration, Velocity vs. Time Graphs.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 181 Interpolation Chapter 18 Estimation of intermediate.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Interpolation Chapter 18.
Chapter 6 Numerical Interpolation
Mehnaaz Asad IB2-3. Data logging is the collection of data over a period of time, and is something often used in scientific experiments. Data logging.
Chapter 9 Numerical Integration Numerical Integration Application: Normal Distributions Copyright © The McGraw-Hill Companies, Inc. Permission required.
So Far….we have this mess of data….what to do with it all? Take a step back and try and see if we can come to a consensus on a few things Let’s start with.
CMPS1371 Introduction to Computing for Engineers NUMERICAL METHODS.
3.2 – Solving Linear Equations by Graphing. Ex.1 Solve the equation by graphing. x – y = 1.
Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 9: Introduction to Spline Curves.
What are the objectives of Unit 3? To learn how to critically analyze data using graphs. To learn how to critically analyze data using graphs. To learn.
Describing Periodic Motion AP Physics. Hooke’s Law.
Robotics Chapter 5 – Path and Trajectory Planning
11 INFINITE SEQUENCES AND SERIES Applications of Taylor Polynomials INFINITE SEQUENCES AND SERIES In this section, we will learn about: Two types.
Copyright © Cengage Learning. All rights reserved. 11 Infinite Sequences and Series.
Curve-Fitting Regression
Numerical Methods for Engineering MECN 3500
Computers in Civil Engineering 53:081 Spring 2003 Lecture #15 Spline Interpolation.
Computer Programming (TKK-2144) 13/14 Semester 1 Instructor: Rama Oktavian Office Hr.: M.13-15, W Th , F
Polynomials, Curve Fitting and Interpolation. In this chapter will study Polynomials – functions of a special form that arise often in science and engineering.
Trajectory Generation
Spring Force and Energy Notes
MODEL FITTING jiangyushan. Introduction The goal of model fitting is to choose values for the parameters in a function to best describe a set of data.
Principles of Extrapolation
Recap Functions with No input OR No output Determining The Number of Input and Output Arguments Local Variables Global Variables Creating ToolBox of Functions.
1 Lecture 8 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Chapter 17 and 18 Interpolation.
MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 13.1 Interpolation between.
Computer Graphics CC416 Lecture 04: Bresenham Line Algorithm & Mid-point circle algorithm Dr. Manal Helal – Fall 2014.
Calibration of a Thermistor Voltage Divider Portland State University Department of Mechanical Engineering ME 121: Engineering Problem Solving.
Copyright © Cengage Learning. All rights reserved Applications of Taylor Polynomials.
Lecture 29: Modeling Data. Data Modeling Interpolate between data points, using either linear or cubic spline models Model a set of data points as a polynomial.
Chapter 2 Review Chapter 2 has taken a long time… you might want to get out your notes and a book to refer to 
Chapter 3 Objectives: 1) Define acceleration.
3.5: Solving Nonlinear Systems
EEE 244-7: Curve Fitting.
Graphical Interpretation of Motion in One Dimension
Chapter 6: Image Geometry 6.1 Interpolation of Data
Interpolation Estimation of intermediate values between precise data points. The most common method is: Although there is one and only one nth-order.
Chapter 18.
Prepared by Vince Zaccone
Chapter 15 Curve Fitting : Splines
4.6 – Graphs of Composite Trigonometric Functions
Chapter 18.
INTERPOLATION Prof. Samuel Okolie, Prof. Yinka Adekunle & Dr
Copyright © Cengage Learning. All rights reserved.
Graphing Displacement
Use a table of values to estimate the value of the limit. {image}
4.6 – Graphs of Composite Trigonometric Functions
Splines and Piecewise Interpolation
Compressed springs store energy.
Splines There are cases where polynomial interpolation is bad
© 2010 Cengage Learning Engineering. All Rights Reserved.
SKTN 2393 Numerical Methods for Nuclear Engineers
Rounding and estimating: Upper and Lower Bounds
Spline representation. ❖ A spline is a flexible strip used to produce a smooth curve through a designated set of points. ❖ Mathematically describe such.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Presentation transcript:

Interpolation

Interpolation The process of inserting new data points between existing discrete data points Examples of Applications: Signal Compression - some minimal amount data is stored or transmitted (enough to preserve the necessary information in the video or audio signal) then new data points are added when the signal is to be viewed (video) or listened to (audio) Multi-rate Processing - altering the sampling rate of a digital signal in order to interface with a system operating at a different sampling rate Estimation - estimating a value for a set of data when no data was collected (estimate the air temperature at 10:15am when data is collected every 10 minutes)

Interpolation Time (s) Displacement (cm) 1 0.5 -0.61 1.5 2 0.37 2.5 3 -0.22 3.5 4 0.14 4.5 5 -0.08 Suppose we have a mass attached to a spring. The spring was compressed from the equilibrium point by 1 cm and then released to oscillate freely. Our sensor only allowed us to take measurements of the displacement of the mass every 0.5 seconds but we need measurements every 0.1 seconds for further processing.

Nearest Point Interpolation Time (s) Displacement (cm) 1 0.5 -0.61 1.5 2 0.37 2.5 3 -0.22 3.5 4 0.14 4.5 5 -0.08 Estimated Displacement at t = 0.9 s? Nearest point: Just round to the nearest value listed in the table. Estimated Displacement at t = 0.9 s? -0.61 cm

Linear Interpolation Estimated Displacement at t = 0.9s ? Time (s) Displacement (cm) 1 0.5 -0.61 1.5 2 0.37 2.5 3 -0.22 3.5 4 0.14 4.5 5 -0.08 Estimated Displacement at t = 0.9s ? Linear Interpolation: Find the equation for the line connecting the two adjacent points surrounding the desired point. Estimate falls on this line: 𝑦= 𝑦 0 +𝑚(𝑥 − 𝑥 0 )

Linear Interpolation Estimated Displacement at t = 0.9s ? Time (s) Displacement (cm) 1 0.5 -0.61 1.5 2 0.37 2.5 3 -0.22 3.5 4 0.14 4.5 5 -0.08 Estimated Displacement at t = 0.9s ? 0.9

Linear Interpolation Find the equation for the line connecting the two adjacent points surrounding the desired point then plug in time at which you want displacement. Step 1: Find slope, m 𝑚= 𝑟𝑖𝑠𝑒 𝑟𝑢𝑛 = −0.61−0 1 −0.5 =−1.22 Step 2: Write line equation 𝑦= 𝑦 0 +𝑚 𝑥 − 𝑥 0 d=0+ −1.22 ∙(𝑡 −0.5) Step 3: Plug in t = 0.9 s d=0+ −1.22 ∙ .9 −0.5 → 𝒅=−𝟎.𝟒𝟖𝟖 𝒄𝒎

Linear Interpolation Estimated Displacement at t = 0.6, 0.7, 0.8s ? Time (s) Displacement (cm) 1 0.5 -0.61 1.5 2 0.37 2.5 3 -0.22 3.5 4 0.14 4.5 5 -0.08 Estimated Displacement at t = 0.6, 0.7, 0.8s ? Two surrounding points are the same!

Linear Interpolation Estimated Displacement at t = 0.6, 0.7, 0.8s ? Line Equation: d=0+ −1.22 ∙(𝑡 −0.5) Plug in t-values d= −1.22 ∙ .𝟔 −0.5 =−.𝟏𝟐𝟐 d= −1.22 ∙ .𝟕 −0.5 =−.𝟐𝟒𝟒 d= −1.22 ∙ .𝟖 −0.5 =−.𝟑𝟔𝟔

Viewing Interpolation Graphically What is the estimated displacement at 3.4 s using nearest point interpolation? Estimated displacement at 3.4 s using nearest point interpolation? 0 cm

Viewing Interpolation Graphically What is the estimated displacement at 3.4 s using linear interpolation? Surrounding Points: (3, -0.22) & (3.5, 0)

Linear Interpolation Find the equation for the line connecting the two adjacent points surrounding the desired point then plug in time at which you want displacement. Step 1: Find slope, m using surrounding Points: (3, -0.22) (3.5, 0) 𝑚= 𝑟𝑖𝑠𝑒 𝑟𝑢𝑛 = 0 −(−0.22) 3.5−3 =0.44 Step 2: Write line equation 𝑦= 𝑦 0 +𝑚 𝑥 − 𝑥 0 d=−0.22+ 0.44 ∙(𝑡 −3) Step 3: Plug in t = 3.4 s d=−0.22+ 0.44 ∙ 3.4 −3 → 𝒅=−𝟎.𝟎𝟒𝟒 𝒄𝒎

Viewing Interpolation Graphically What is the estimated displacement at 3.4 s using linear interpolation? Estimated displacement at 3.4 s using linear interpolation? -0.044 cm

Types of Interpolation Nearest point – round to the nearest existing data point. Linear – insert values along a straight line between two adjacent data points. Polynomial Interpolation – insert values along a polynomial that perfectly fits N adjacent data points. Note: The polynomial will be order N – 1 or lower. Spline Interpolation – creates a set of lower order polynomials between adjacent data points that fit together with the polynomials in adjacent intervals. (MATLAB uses cubic spline). Many, many other algorithms including filtering.

Interpolation There is a trade-off between accuracy and complexity of calculations. More complicated interpolation algorithms require more adjacent data points. The algorithms are more complicated and take more time but produce more accurate estimates of values between existing data points. If the interpolation is being performed in real-time; that is, as data samples arrive, there is a greater time delay for the algorithms that use more data points for the interpolation.

MATLAB function: interp1 yint = interp1(x,y,xint,method) The function, interp1, uses the original x and y values (data points) and interpolates to find the new values yint at the desired points in xint. Methods: ‘nearest’ ‘linear’ ‘spline’ or ‘pchip’ Desired y Original x, y Desired x

Quick Preview of interp1 Time (s) Displacement (cm) 1 0.5 -0.61 1.5 2 0.37 2.5 3 -0.22 3.5 4 0.14 4.5 5 -0.08 Estimated Displacement at t = 0.9 s? >> interp1([0.5 1],[0 -0.61],0.9,'linear') ans = -0.448

Quick Preview of interp1 Estimated Displacement at t = 0.6, 0.7, 0.8 and 0.9s? Time (s) Displacement (cm) 1 0.5 -0.61 1.5 2 0.37 2.5 3 -0.22 3.5 4 0.14 4.5 5 -0.08 Same results as before! >> interp1([0.5 1],[0 -0.61],[0.6:0.1:0.9],'linear') ans = -0.1220 -0.2440 -0.3660 -0.4880

Interpolation vs. Curve Fitting Interpolation stuffs new data points between existing points without attempting to determine some overall mathematical expression. Interpolation utilizes equations that are satisfied by the subset of existing data points being used for the interpolation calculation. Existing data points are not modified. Curve fitting does not require that any of the existing data points satisfy the resulting mathematical expression. It is possible that none of the original data points are on the graph of the resulting function.

Your Turn … Time (s) Velocity (m/s) 3 0.2 2 0.4 1 0.6 4 Compute the estimated velocity at 0.1s and 0.55s using nearest point and linear interpolation. You could use interp1 in MATLAB to check your results.

Your Turn … Compute the estimated voltage at 1.2s and 1.8s using linear interpolation.

Test Your Understanding