+ All Categories
Home > Documents > L14 Curve Fitting

L14 Curve Fitting

Date post: 31-Dec-2015
Category:
Upload: denise-conway
View: 90 times
Download: 2 times
Share this document with a friend
Description:
L14 Curve Fitting. Homework Curve Fitting – least squares Curve Fitting - optimization Summary. H13 prob 6.5. Beware: some problems don’t need solving! f ( x )=0, when x = 0!. H13 Prob 6.9. Prob 6.9 RJE sol’n. Prob 3.33. Why is this formulation better?. Prob 3.33 cont’d. Report #1. - PowerPoint PPT Presentation
Popular Tags:
20
L14 Curve Fitting • Homework • Curve Fitting – least squares • Curve Fitting - optimization • Summary 1
Transcript

L14 Curve Fitting

• Homework• Curve Fitting – least squares• Curve Fitting - optimization• Summary

1

H13 prob 6.5

2

Beware: some problems don’t need solving!f(x)=0, when x=0!

H13 Prob 6.9

3

Prob 6.9 RJE sol’n

4

Prob 3.33

50:

1.0:0:

4.0:4/:

)2(:..

2)(min

6

5

4

3

2332

1

tgtgRgRg

ltERπPg

πRtPgts

ρlπRtf x

Why is this formulation better?

Prob 3.33 cont’d

6

7

Report #1

8

Report #2

9

Worksheet Modifications

• Naming cells• Inserting shapes• Inserting MS Equation “object”• Recording macros• Attaching a macro to a shape• Creating a SOLVER hot button• Visual basic, tools/references/solver

10

11

Figure 6.13 Excel worksheet for the spring design problem.

Curve fitting

12

 

 

 

 

 

)(xf

)(

)(

),(),(),(

),(

444

333

222

111

iii

i

xfyeeerror

xfy

yxPyxPyxPyxP

Minimize sum of all errors?

13

n

iii

ii

baxyz

baxybaxyz

eee

baxyxfy

1

2

222

211

23

22

21

)(

)()(

zerrorssquared theofsum zlet

)(line?straight a todataFit

NC for Unconstrained z(a,b)

14

0

0

0)(2)(

0)(2)(

:conditions necessaryusing),(min

1

2

1

11

2

11

2

n

iiiii

n

iii

n

iii

n

iii

n

iiii

n

iii

yxbxax

ybax

baxybaxybb

z

baxyxbaxyaa

zz

baz0

Straight Line Least Squares

15

b!&a : unknowns2in equations 2

rulevedistributi use

111

2

11

n

iii

n

ii

n

ii

n

ii

n

ii

yxxbxa

ybnxa All numbers

Mathematical method that works for straight lines!

Another way? Especially for non-linear curve fits?

Types of curves

16

xa

a

eaxf

xaxf

xaxaxaaxf

xaxaaxf

xaaxf

7

5

6

4

33

2210

2210

10

)(lexponentia

)(power

)(cubic

)(quadratic

)(linear

Need to find the parameters ai Another way? Especially for non-linear curve fits?

i

iii

i xfyez 22 )]([)( minimize a

Use Excel & Solver (Garnero)?

17

18

Curve Fit example

19

Summary• Pay attention to layout

– Design variables– Parameters– Analysis/Performance “Variables”– Objective function– Constraints

• May need multiple starting points• Curve fitting w/optimization methods

= min sum of errors to find parameters ai

20


Recommended