detc2008-49101 asme computers and information in engineering conference one and two dimensional data...

21
DETC2008- 49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester Institute of Technology Department of Mechanical Engineering CTESA: Computational Technologies for Engineering Sciences Applications August 3 - 6, 2008, New York City NY, USA

Upload: giancarlo-bayles

Post on 01-Apr-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ASME Computers and Information in Engineering Conference

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P.VenkataramanRochester Institute of TechnologyDepartment of Mechanical Engineering

CTESA: Computational Technologies for Engineering Sciences Applications

August 3 - 6, 2008, New York City NY, USA

Page 2: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Presentation Outline

1. Motivation

2. Bezier Function

3. Data Fitting

4. Computational Resource

5. Example 1

Example 2

Example 4

6. Conclusions

1/20

Page 3: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Motivation

2/20

Current Status

In prior presentations of this technical committee it has been shown that it is possible to obtain explicit solutions in polynomial form for

Linear or nonlinear,

Single or coupled,

Ordinary or partial,

Differential equations using Bezier functions

Page 4: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Motivation

3/20

Inverse Problem

One definition of an inverse problem and its solution is

Given a sequence of data

Establish the differential equation whose solution

Is represented by the data

Page 5: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Motivation

4/20

This Paper

This paper approaches the solution of the inverse problem in two steps

Given a sequence of data {xi, yi}

....n n n n n n

a y y a y y a y y 1 2 3 4 5 6

1 2 3 0

Find a function that best fits the data – y(x)

Then establish the coefficients of the differential system that the function will belong too:

This paper addresses only the first step

Page 6: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Bezier Function

5/20

Description

0 1 2 3 4 50

0.5

1

1.5

2

2.5

3

3.5

4

x: independent variable

y: d

ep

end

en

t va

ria

ble

s

[a1,b1][a1,b1]

[a2,b2]

[a3,b3]

[a4,b4]

[a5,b5]

Convex hullBezier VerticesBezier Curve: order 4

,0

( ) ( ) ( ) , 0 1

n

i n ii

Bx p y p J p p

1, ( ) ( )i n in i

nJ p p p

i

p : parameter

Bernstein basis

Number of vertices: 5

Order of the function : 4

Page 7: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Bezier Function

6/20

Matrix Description

0 1 2 3 4 50

0.5

1

1.5

2

2.5

3

3.5

4

x: independent variable

y: d

ep

end

en

t va

ria

ble

s

[a1,b1][a1,b1]

[a2,b2]

[a3,b3]

[a4,b4]

[a5,b5]

Convex hullBezier VerticesBezier Curve: order 4

Matrix Description

[ ( ) ( )] [ ][ ][ ]x p y p P N B

4 3 2[ ] [ 1];

1 -4 6 -4 1 0 0

-4 12 -12 4 0 1 3

[ ] 6 -12 6 0 0 [ ] 2 1

-4 4 0 0 0 3 2

1 0 0 0 0 5

P p p p p

N B

0

Page 8: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Data Fitting

7/20

Problem Definition

For a selected order of the Bezier function (n) Given a set of (m) vector data ya,i , or [Y], find the coefficient matrix, [B] so that the corresponding data set yb,i , [YB ] produces the least sum of the squared error

2

, ,

m

a i b ii

E y y T T

B B A AE Y Y Y Y Y P NB Y P NB

0E

B

1[ ] [ ] [ ]T TA A AB P P P Y

Minimize

FOC:

Page 9: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Data Fitting

8/20

Data Decoupling

[ ( ) ( )] [ ][ ][ ]x yx p y p P N B B

[ ( )] [ ][ ][ ]; [ ( ) ] [ ][ ][ ]x yx p P N B y p P N B

[ ( ) ( )] [ ][ ][ ]x p y p P N B

The matrix definition for the Bezier function is

It can be recognized as

And can be decoupled as

Page 10: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Computational Resources

9/20

Software used: MATLAB 2006b for plots and calculations

This work is independent of any language/software/platform

32-bit architecture required limiting the order of the Bezier functions to 20

Standard data statistics is used for comparison

Page 11: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Examples

10/20

Example 1: Smooth Data at Equidistant Intervals

Example 2: Rough Data at Arbitrary Intervals

Example 4: Unorganized Data

Three of the five examples are presented

Page 12: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Examples

11/20

Example 1

The data is generated at equidistant intervals of the independent variable (x) The dependent variable (y) values are generated using a smooth function There are 101 data pairs.

0 2 4 6 8 10 12-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

y -

Ori

gin

al D

ata

, F

itte

d D

ata

x

m =15,1.3031e-006,8.8965e-008

Original DataBezier Data

Best order: 15

Error x: 1.3e-06

Error y: 8.8e-08

Page 13: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Examples

12/20

Example 1- statistics

Statistical Variable

Original Data

Bezier Data

Average Error - 1.29016e-008 Sum of Avg. Error - 1.30306e-006 Minimum 0.10000 0.10000 Maximum 10.10000 10.10000 Mean 5.10000 5.10000 Lower Quartile 2.50000 2.50000 Median 5.10000 5.10000 Upper Quartile 7.60000 7.60000 Variance 8.58500 8.58500 Std. Deviation 2.93002 2.93002 Skew 0.00000 0.00000 Kurtosis 1.78195 1.78195

Statistical Variable

Original Data

Bezier Data

Average Error - 8.80839e-010 Sum of Avg. Error - 8.89647e-008 Minimum -0.21723 -0.21723 Maximum 0.99833 0.99833 Mean 0.15835 0.15835 Lower Quartile 0.23939 0.23939 Median 0.06043 0.06043 Upper Quartile 7.60000 7.60000 Variance 0.12159 0.12159 Std. Deviation 0.34870 0.34870 Skew 1.20522 1.20522 Kurtosis 3.27429 3.27429

Comparison of x-data Comparison of y-data

Page 14: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Examples

13/20

Example 1 - Coefficients

Bezier Coefficient Values:

0 1000 0 7667 1 4333 2 1000 2 7667

3 4333 4 1000 4 7667 5 4333 6 1000

6 7667 7 4333 8 1000 8 7667 9 4333 10 1000

[ , ];

[ . . . . .

. . . . .

. . . . . . ];

T Tx y

x

y

B B B

B

B

0 9983 0 9761 0 7957 0 4643 0 0501

0 3219 0 5129 0 4518 0 1987 0 0646

0 2192 0 2392 0 1689 0 0692 0 0145 0 0619

[ . . . . .

- . - . - . - . .

. . . . - . - . ];

The data in Example 1 can be reproduced by a super continuous 15th order Bezier function, whose derivatives can be easily established by known calculations

Page 15: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Examples

14/20

Example 1 – Explicit Polynomial

15 14

13 12 11

10 9 8

7 6 5

4

10 000 p 0 0093904 p 0 068148

0 22214 0 42945 0 54786

0 48598 0 30818 0 14176

0 047558 0 011551 0 0019640

0 00021731

( ) . - . .

- . . - .

. - . .

- . . - .

.

x p p

p p p

p p p

p p p

p 3 6 2 0 000014486 0 44443 10

0 10000

-- . .

.

p p

15 15 14

13 12 11

10 9 8

7 6 5 4

3

0 33300 p 32 424 p 239 97

725 02 1101 7 819 23

282 78 271 21 357 81

1 5170 194 05 12 322 83 070

3 3278

( ) - . - . .

- . . - .

. - . .

. - . - . .

. -

y p p

p p p

p p p

p p p p

p 2 16 617 0 99833

0 1

. .p

p

Page 16: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Examples

15/20

Example 2

Random values between specified limits are used to construct values for x and y. It is then sorted in ascending order.

0 10 20 30 40 500

1

2

3

4

5

y -

Ori

gin

al D

ata

, F

itte

d D

ata

x

m =13,38.9678,3.3182

Original Data

Bezier DataBest order: 13

Range x:

x 0 5Error sum : 38.96

Range y: y 0 5Error sum: 3.31

Page 17: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Examples

16/20

Example 2- statistics

Statistical Variable

Original Data

Bezier Data

Average Error - 3.85820e-001 Sum of Avg. Error

- 3.89678e+001

Minimum 0.71165 0.30004 Maximum 49.97658 49.83972 Mean 24.66713 24.66713 Lower Quartile 11.09540 11.07036 Median 23.04031 23.49545 Upper Quartile 38.49592 38.95432 Variance 239.48599 239.23612 Std. Deviation 15.47533 15.46726 Skew 0.07040 0.07040 Kurtosis 1.66391 1.66560

Statistical Variable

Original Data

Bezier Data

Average Error - 3.28532e-002 Sum of Avg. Error

- 3.31818e+000

Minimum 0.05965 0.02966 Maximum 4.96323 4.94927 Mean 2.57604 2.57604 Lower Quartile 1.14288 1.14376 Median 2.65689 2.74216 Upper Quartile 3.77011 3.73577 Variance 2.13010 2.12843 Std. Deviation 1.45949 1.45891 Skew -0.10248 -0.10244 Kurtosis 1.76014 1.76175

Data statistics : x

Data statistics: y

Page 18: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Examples

17/20

Example 4

In this example the Adjusted Closing values of the Dow Jones Industrial Average between May 17 and December 18, 2007, is used for the original data

0 50 100 1501.26

1.28

1.3

1.32

1.34

1.36

1.38

1.4

1.42x 10

4

Ori

gin

al D

ata,

Fit

ted

Dat

a

points

Original

Bezier+std/2

-std/2

Best order: 20 (maximum)

Almost all data points are within a standard deviation of the Bezier representation

Page 19: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Examples

18/20

Example 4- statistics

Statistical Variable

Original Data

Bezier Data

Average Error - 9.98530e+001 Sum of Avg. Error

- 1.49779e+004

Minimum 12743.44000 12942.60503 Maximum 14164.53000 14057.45362 Mean 13505.92727 13505.92630 Lower Quartile 13577.87000 13735.54708 Median 13495.56000 13494.13619 Upper Quartile 13671.92000 13747.11526 Variance 93986.14832 77578.45882 Std. Deviation 306.57160 278.52910 Skew -0.01749 0.10189 Kurtosis 2.50486 2.29239

Statistics: y data

The Bezier representation preserves the average value of the data

Page 20: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Conclusions

19/20

Bezier functions are easy to incorporate and can track regular and unpredictable data very well

The Bezier functions have excellent blending and smoothing properties

High order of functions can be useful in capturing the data content and underlying behavior

The mean of the Bezier data is the same as the mean of the original data

Bezier functions naturally decouples the independent and the dependent variables

Page 21: DETC2008-49101 ASME Computers and Information in Engineering Conference ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS P.Venkataraman Rochester

DETC2008-49101

ONE AND TWO DIMENSIONAL DATA ANALYSIS USING BEZIER FUNCTIONS

P. Venkataraman Mechanical Engineering Rochester Institute of Technology

CTESA: CIE-2-3 Numerical method for modeling

Conclusions

Thank You!

Questions?