Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept....

33
Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics Michigan Technological University © John W. Sutherland Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005

Transcript of Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept....

Page 1: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Lecture # 37

Prof. John W. Sutherland

Nov. 28, 2005

Page 2: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Linear Regression

y

x0 1 2 3 4 5 6 7 80

1

23

45

67

8

Page 3: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Modeling

To describe the data above, propose the model:

Fitted model will then be

Want to select values for that minimize

y B0 B1x ε+ +=

y b0 b1x+=

b0 & b1

yi yi–( )2

i 1=

n 6=∑

Page 4: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Modeling (Cont.)

Define

the model residual Sum of Squares.

Minimize

S b0 b1,( ) yi yi–( )2

i 1=

n 6=∑=

S b0 b1,( ) yi yi–( )2

i 1=

n 6=∑ yi b0– b1x1–( )2

i 1=

n 6=∑= =

Page 5: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Modeling (Cont.)

To find minimum S, take partial derivatives of S with

respect to , set these equal to zero, and

solve for

b0 & b1

b0 & b1

b0∂∂ S b0 b1,( ) 2Σ yi b0– b1xi–( ) 1–( ) 0==

b1∂∂ S b0 b1,( ) 2Σ yi b0– b1xi–( ) xi–( ) 0==

Page 6: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Modeling (Cont.)

Simplifying, we obtain:

Σyi– Σbo Σb1xi+ + 0=

Σxiyi– Σboxi Σb1xi2+ + 0=

nb0 b1Σxi+ Σyi=

b0Σxi b1Σxi2+ Σxiyi=

Page 7: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Modeling (Cont.)

These two equations are known as “Normal Equations”.

The values of that satisfy the Normal

Equations are the least squares estimates -- they are thevalues that give a minimum S.

b0 & b1

Page 8: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Matrix Form

= Least Squares Estimates

=

N Σxi

Σxi Σxi2

b0b1

Σ yi

Σ xiyi

=

b0*

b1*

n Σx

Σx Σx2

1–Σ yΣ xy

Page 9: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Matrix Form (Cont.)

=

=

b0*

b1*

1

nΣx2 Σx( )2–--------------------------------- Σx2 Σx–

Σx– n

Σ yΣ xy

1

nΣx2 Σx( )2–--------------------------------- Σx2Σy ΣxΣxy–

ΣxΣy– nΣxy+

Page 10: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Matrix Form (Cont.)

=

, are the values of & that minimize S, theResidual Sum of Squares.

= = an estimate of

= = an estimate of

b0*

b1*

1.46670.9143

b0* b1

* b0 b1

b0* B0 B0

b1* B1 B1

Page 11: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Fitted Line

012345678

0 2 4 6 8

X

Y

Page 12: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Matrix Approach

: Vector of Observations = ,

: Matrix of Independent Variables, i.e.,

the Design Matrix =

235576

111111

123456

Page 13: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Matrix Approach (Cont)

= Vector of Predictions = =

b coefficients =

y1y2

::

yn

x˜b˜

b0b1

Page 14: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Matrix Approach (Cont.)

= Vector of Prediction Errors =

=

Want to Min or Min

e1e2

::

en

y˜y˜

e˜Te˜

y˜x˜b˜

–( )T y˜x˜b˜

–( )

Page 15: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Matrix Approach (Cont.)

Take derivative with respect to b’s and set = 0

x˜T y

˜x˜b˜

–( )– 0 x˜T– y˜

x˜Tx˜

( )b˜

+= =

x˜Tx˜

( )b˜

x˜Ty˜

=

Page 16: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Matrix Approach (Cont.)

Therefore, .

It is analogous to

x˜Tx˜

( ) 1– x˜Ty˜

=

b0b1

n Σx

Σx Σx2

1–Σy

Σxy

=

Page 17: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Matrix Approach (Cont.)

Re-run experiments several times

If true model is y = B0 +B1 x + ε

Then E(b0) = B0 , E(b1)=B1 , E[ ] =

b0b1

1.4667

0.9143 b0

b1 1.5309

0.9741 b0

b1 1.5512

1.0134

=,=,=

Page 18: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Matrix Approach (Cont.)

where, describes the experimental error variation in

the y’s ( ).

B0

b0

Var b˜

( ) x˜Tx

˜( )

1–σy

2=

σy2

σε2

Page 19: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Matrix Approach (Cont.)

For our example, .

If ( or ) is unknown, we can estimate it with

Var b˜

( )Var b0( ) Cov b0 b1,( )

Cov b0 b1,( ) Var b1( )=

σy2 σε

2

s2 y y–( )T y y–( )n - # of parameters( )

-------------------------------------------------- eTen p–------------

Sresν

-----------= = =

Page 20: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Matrix Approach (Cont.)For the example,

standard error of b0

standard error of b1

sy2

yi yiˆ–( )

2

i 1=

n 6=∑

n 2–------------------------------------ 0.67619= =

Var b˜

( ) x˜Tx

˜( )

1–sy2 0.586 0.135–

0.135– 0.039= =

)

sb02 0.586 sb0

, 0.767= =

sb12 0.039 sb1

, 0.197= =

Page 21: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Dynamic Systems

• Many processes have dynamic characteristics -- dataare produced as a result of dynamic behavior withinthe process- Chemical processes- Vibrating systems- ?

Process Data, X’s

Page 22: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

More on Dynamic Systems

• Because of our experience with differential equationsand vibrations, we tend to think of dynamic behavioras in the figure below.

0

1

23

4

5

0 0 . 2 0 . 4 0 . 6 0 . 8 1

t i m e

resp

onse

Page 23: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Common Cause Variability

• With the addition of process noise, however, we oftensee behavior like that below.

0123456

0 0 .2 0 .4 0 .6 0 .8 1

tim e

resp

onse

Page 24: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Time Series Analysis

• For situations like that shown in the previous figure,we can use time series analysis to extract informationabout the process.

• From a time series model we can “back out”information about the unknown underlying systemdynamics.

• Simple autoregressive model [ AR(1) ]

Xi φXi 1– ai+=

Page 25: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Interpreting Phi

-20

-10

010

20

30

0 20 40 60 80 100

sample number

data

(X)

-30-20

-100

1020

30

-30 -20 -10 0 10 20 30

X(i-1)

X(i)

φ = 0.9

Page 26: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Interpreting Phi

φ = - 0.7

-20-15-10-5051015

0 20 40 60 80 100

sample number

data

(X)

-20

-10

0

10

20

-20 -10 0 10 20

X(i-1)

X(i)

Page 27: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Interpreting Phi

φ = 1.02

-40

-20

0

20

40

60

80

100

0 20 40 60 80 100

Sample #

X(i)

-40

-20

0

20

40

60

80

100

-40 -20 0 20 40 60 80 100

X(i-1)

X(i)

Behavior is unstablebecause φ>1

Page 28: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Finding φ

Let’s say that we have a series of data such as that below

-15

-10

-5

0

5

10

15

-15 -10 -5 0 5 10 15

X(i-1)

X(i)

-15

-10

-5

0

5

10

15

0 20 40 60 80 100

Sample #

X(i)

Page 29: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Finding φ

Let’s apply this model to data:

Same form as yi = β1 xi + εi

We now know how to estimate the value for β1 (calledestimate b1)

Xi φXi 1– ai+=

S Xi Xi–( )2

i 1=

n∑ Xi φXi 1––( )2

i 1=

n∑= =

dSdφ------------ 2Σ Xi φXi 1––( ) 1–( ) 0==

Page 30: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Finding φ

For data shown previously,

So, -- also can be thought of as a forecast

φ XiXi 1–i 2=

n

∑ Xi 1–2

i 2=

n

∑⁄=

XiXi 1–i 2=

n

∑ 725.71= Xi 1–2

i 2=

n

∑ 1562.15=

φ 0.465=

Xi φXi 1–=

Page 31: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

Backshift Operator

Define backshift operator as

In general,

Previous equation: , can be rewritten as

-- denominator is characteristic eqn

Xt 1– BXt=

Xt j– BjXt=

Xi φXi 1– ai+=

Xi φXi 1– ai+= Xi φBXi ai+= Xi 1 φB–( ) ai=

Xi ai 1 φB–( )⁄=

Page 32: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

More on AR(1)

, or since

or

or

Note similar form to EWMA

Xi φXi 1– ai+= Xi 1– φXi 2– ai 1–+=

Xi φ φXi 2– ai 1–+( ) ai+= Xi φ2Xi 2– φai 1–+ ai+=

Xi φj

j 0=

k

∑ ai j–=

Page 33: Lecture # 37 Prof. John W. Sutherland Nov. 28, 2005 · Quality Engineering (MEEM 4650 / 5650) Dept. of Mechanical Engineering - Engineering Mechanics © John W. Sutherland Michigan

Quality Engineering (MEEM 4650 / 5650)Dept. of Mechanical Engineering - Engineering MechanicsMichigan Technological University © John W. Sutherland

AR(2) Model

AR(2) model:

or

Xt φ1Xt 1– φ2Xt 1– a+t

+=

Xt φ1– Xt 1– φ2– Xt 2– at=

at~NID 0 σa2

,