Curve fitting - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Curve fitting

Description:

Method of Lagrange interpolation is based on building auxiliary polynomials ... Polynomial interpolation. Reduction to ill-conditioned ... Spline interpolation ... – PowerPoint PPT presentation

Number of Views:2210
Avg rating:3.0/5.0
Slides: 19
Provided by: arcady
Category:

less

Transcript and Presenter's Notes

Title: Curve fitting


1
Curve fitting
  • Usage
  • Number of specified points is insufficient to
    produce smooth curve
  • An analytical expression is required for further
    manipulations
  • Basic methods
  • Polynomial interpolation
  • Spline interpolation
  • Least Squares Method (LSM)
  • Points to note
  • Relative advantages and disadvantages of the
    curve fitting methods
  • Stability with respect to errors in the data
    points

2
Polynomial interpolation
Given
Needs to be found
with the coefficients a0 ,..., an such that
If the interpolating nodes are different, the
interpolating polynomial exists and is unique.
3
Direct solution of the system. Condition number
  • Example xii

N3
N5
N10
Indirect solution auxiliary polynomials
4
Example
Signal
400
200
0
1
2
Which are the intermediate values?
5
Auxiliary polynomial 1
Method of Lagrange interpolation is based on
building auxiliary polynomials related to the
x-values.
6
Auxiliary polynomials 2 and 3
7
Lagrange polynomial
8
Lagrange polynomial. General case
Auxiliary polynomials
Lagrange polynomial
9
Example
Runge's function. Polynomial interpolation on the
interval -1,1 with equally spaced points
8
1
6
0.5
p15(x)
4
2
0
p5(x)
0
-2
0.5
-1
0
0.5
1
-1
0
0.5
1
-0.5
-0.5
5 nodes
15 nodes
10
Spline interpolation
Piecewise linear approximation
f(x)
  • Each segment is approximated by a linear
    function.
  • The information stored in other points is not
    used.

x
11
Example
MathCad linterp(vx,vy,x)
12
Natural cubic spline
yk
y2
y1
Sk(x)
y0
Sk1(x)
yn
...
...
xk
Passage through the given points
Smoothness
End conditions Natural cubic spline
13
Example
Runge's function
15 nodes
Cubic spline
Polynomial
14
Example. Derivatives of cubic spline
Runge's function
First derivative
Second derivative
15
Least Squares Method (LSM)
  • Best fit of a polynomial of given degree to the
    given data points
  • Best for the case when the data points have
    random (non-systematic) errors

16
Example
Separating Signal and Noise. Fitting a line
through some given points, may give us a clean
view of the signal.
Gain of signal with respect to some evenly
spaced time values
Polynomial of 3rd degree
Polynomial of 2nd degree
Polynomial of 1st degree
17
Example (Cont.)
p2(c)
p3(c)
p1(c)
Experimental data
18
Summary
  • Need for curve fitting - Number of data points is
    insufficient to produce smooth curve
  • Polynomial interpolation
  • Reduction to ill-conditioned system of equations
    / Lagrange polynomial
  • Polynomial, smooth
  • Passes through all points
  • High degree polynomial, degree is determined by
    the number of points
  • Sensitive to errors
  • Spline interpolation
  • Different polynomial in each segment and
    conditions of smoothness on the interfaces
  • Passes through all points
  • Low sensitivity to errors
  • Not sufficiently smooth
  • Least Squares Method (LSM)
  • Minimises the distance between the polynomial of
    given degree and the data points
  • Does not pass through all points
  • Polynomial - smooth
  • Low sensitivity to errors
Write a Comment
User Comments (0)
About PowerShow.com