lecture9 - Numerical Methods in Engineering ENGR 391 Curve...

Info iconThis preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
Numerical Methods in Engineering ENGR 391 Faculty of Engineering and Computer Sciences Concordia University Curve fitting and interpolation Chapter 5
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Curve fitting 1. Obtain estimates between data points 2. Obtain a simplified version of a complicated function Least Square Regression -des ire a curve (equat ion) to follow the general trend of the data -“bes t f it” Interpolation -Use w ith prec ise data -curves that intersect a l l of the data po ints Data usually available at discrete points from measurements, tables of data, etc. We may want to:
Background image of page 2
Regression Used when there is error associated with data Desire a general trend of the data Least square regression method to determine the best fit of an equation to data simplest approximation ± Straight Line Objective y=a 0 +a 1 x+e Higher order polynomial or linearization of nonlinear relationship
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The upward velocity of a rocket is given as a function of time in Table 1. 901.67 30 602.97 22.5 517.35 20 362.78 15 227.04 10 0 0 v(t) [m/s] t [s] 0 250 500 750 1000 01 0 2 0 3 0 4 0 t [s] v (t) [s]
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Least Squares Linear Regression Linear Regression • Fitting a straight line to a set of paired observations: (x 1 , y 1 ), (x 2 , y 2 ),…,(x n , y n ). y=a 0 +a 1 x+e a 1 - slope a 0 - intercept e- error, or residual, between the model and the observations Why Least Squares??
Background image of page 6
Criteria for a “Best” Fit • Minimize the sum of the residual errors for all available data: N = total number of points •H o w e v e r , t h i s i s a n i n a d e q u a t e c r i t e r i o n , s o i s the sum of the absolute values ¦ ¦ ± ± N i i o i N i i r x a a y e S 1 1 1 ) ( ¦ ¦ ± ± N i i i N i i r x a a y e S 1 1 0 1
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Chapra & Canele Error positive and negative cancel Anywhere between dashed lines gives the same amount of total error Minimizing each distance (maximum error) for all data points.
Background image of page 8
•B e s t s t r a t e g y i s t o m i n i m i z e t h e s u m o f t h e squares of the residuals between the measured y and the y calculated with the linear model: • Yields a unique line for a given set of data. ¦¦ ¦ ± ± ± N i N i i i i i N i i r x a a y y y e S 11 2 1 0 2 1 2 ) ( ) model , measured , ( Criteria for a “Best” Fit ² Best fit
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
1. Minimize S r –D ifferent iate S r w.r.t. each coefficient a i 2. Set each equation equal to zero 3. Solve N equation for a n unknowns ¦¦ ¦ ± ± ± N i N i i i i i N i i r x a a y y y e S 11 2 1 0 2 1 2 ) ( ) model , measured , ( Linear Least Square Regression
Background image of page 10
Least-Squares Fit of a Straight Line >@ ¦¦ ¦ ¦ ¦ ¦ ± ± ± ± ± ± ± w w ± ± ± w w 2 1 0 1 0 1 1 1 0 0 0 ) ( 2 0 ) ( 2 i i i i i i i i o i r i o i o r x a x a x y x a a y x x a a y a S x a a y a S ²³ x a y a x x N y x y x N a i i i i i i 1 0 2 2 1 ± ± ± ¦ Mean values Solution of these equations: We minimize S r Two equations for your unknowns a 0 and a 1
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
0 0 0 0 1 0 . . . na a a a a n i ± ± ± ¦ ¦ ¦ ± n i i n i i y x a na 1 1 1 0 ¦ ¦ ¦ ± n i i i n i i n i i y x x a x a 1 1 2 1 1 0 2 1 1 2 1 1 1 1 ¸ ¹ · ¨ © § ² ² ¦ ¦ ¦ ¦ ¦ n i i n i i n i i n i i n i i i x x n y x y x n a 2 1 1 2 1 1 1 1 2 0 ¸ ¹ · ¨ © § ² ² ¦ ¦ ¦ ¦ ¦ ¦ n i i n i i n i i i n i i n i i n i i x x n y x x y
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/11/2011 for the course ENGR 391 taught by Professor Hoidick during the Winter '09 term at Concordia Canada.

Page1 / 50

lecture9 - Numerical Methods in Engineering ENGR 391 Curve...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online