The Power Method for Finding

Post on 18-Jan-2018

332 views 16 download

description

Eigenvalues-Eigenvectors The eigenvectors of a matrix are vectors that satisfy Ax = λx Or, (A – λI)x = 0 So, λ is an eigenvalue iff det(A – λI) = 0 Example:

Transcript of The Power Method for Finding

Scientific Computing

The Power Method for FindingDominant Eigenvalue

• The eigenvectors of a matrix are vectors that satisfy Ax = λx Or, (A – λI)x = 0 So, λ is an eigenvalue iff det(A – λI) = 0

Example:

Eigenvalues-Eigenvectors

2/10064/30541

A

)2/1)(4/3)(1(2/10064/30541

)det(

IA

2/1,4/3,1

• Eigenvalues are used in the solution of Engineering Problems involving vibrations, elasticity, oscillating systems, etc.

• Eigenvalues are also important for the analysis of Markov Chains in statistics.

• The next set of slides are from the course “Computer Applications in Engineering and Construction” at Texas A&M (Fall 2008).

Eigenvalues-Eigenvectors

Mass-Spring SystemMass-Spring System

21222

2

2

12121

2

1

kxxxkdt

xdm

xxkkxdt

xdm

)(

)(

Equilibrium positions

Homogeneous system

Find the eigenvalues from det[ ] = 0

Mass-Spring SystemMass-Spring System

0Xm

k2Xmk

0XmkX

mk2

0x2xkdt

xdm

0xx2kdt

xdm

T2 tXx tXx let

22

21

2

21

12

1

2122

2

2

1221

2

1

p2211

)(

)(

;sin,sin

00

XX

mk2mkmkmk2

2

12

22

22

1

////

m1 = m2 = 40 kg, k = 200 N/m

Characteristic equation det[ ] = 0

Two eigenvalues = 3.873s1 or 2.236 s 1 Period Tp = 2/ = 1.62 s or 2.81 s

Polynomial MethodPolynomial Method

0515 07520

105510

mk2mk

mkmk2

2224

2

2

222

22

1

))((

)/(//)/(

Principal Modes of VibrationPrincipal Modes of Vibration

Tp = 1.62 s

X1 = X2

Tp = 2.81 s

X1 = X2

Power method for finding eigenvalues

1. Start with an initial guess for x2. Calculate w = Ax 3. Largest value (magnitude) in w is the

estimate of eigenvalue 4. Get next x by rescaling w (to avoid

the computation of very large matrix An )

5. Continue until converged

Power MethodPower Method

• Start with initial guess z = x0

Power MethodPower Method

Azwz

w Azw

Azwz

w Azw

)2(k

)2(

)2(k

)2()3(

)2(k

)2(k

)2()2(

)1(k

)1(

)1(k

)1()2(

)1(k

)1(k

)1()1(

kn

k3

k2

k1

n321 then , If

rescaling

k is the dominant

eigenvalue

Power MethodPower Method

(1)0

(1) (1) (2)

(2) (2) (3)

( ) ( ) ( 1)

1. 1,1,...,1

2. ;

3. ;

...

T

k

k

k k k

normalize

n

Initial guess z x

Calculate Az w z z by biggest w

Calculate Az w z z by biggest w

Calculate

ormalize

Az w z

• For large number of iterations, should converge to the largest eigenvalue

• The normalization make the right hand side converge to , rather than n

Example: Power MethodExample: Power Method

111

xz

7410438

1082A

0)1(

017143095240

21211520

111

7410438

1082Az 1

...

)(

Start with

Assume all eigenvalues are equally important, since we don’t know which one is dominant

Consider

Eigenvalue estimate Eigenvector

ExampleExampleCurrent estimate for largest eigenvalue is 21 Rescale w by eigenvalue to get new x

017143095240

211520

211

wabswx

...

))(max(

Check Convergence (Norm < tol?)

13433618812382138122xAx

618812382138122

017143095240

2101

7143095240

7410438

1082xAx

222 .).().().(

.

.

.

...

*...

Norm

Update the estimated eigenvector and repeat

New estimate for largest eigenvalue is 19.381 Rescale w by eigenvalue to get new x

381197621361917

017143095240

7410438

1082Az 2

.

.

.

...

)(

017101090910

381197621361917

381191

wabswx

...

.

.

.

.))(max(

58800449603594012030xAx

449603594012030

017101090910

3811901

7101090910

7410438

1082xAx

222 .).().().(

.

.

.

...

*....

Norm

ExampleExample

One more iteration

017080092430

93118931184031349917

017101090910

7410438

1082Az 3

...

....

...

)(

18510144001153001470xAx

144001153001470

017080092430

9311801

7080092430

7410438

1082xAx

222 .).().().(

.

.

.

...

*....

Convergence criterion -- Norm (or relative error) < tol

Norm

Example: Power MethodExample: Power Method

0.17085.09200.0

030.19030.19482.13507.17

0.17085.09196.0

7410438

1082Az

0.17085.09196.0

040.19040.19490.13508.17

0.17084.09206.0

7410438

1082Az

0.17084.09206.0

016.19016.19471.13506.17

0.17087.09181.0

7410438

1082Az

0.17087.09181.0

075.19075.19519.13513.17

0.17080.09243.0

7410438

1082Az

)7(

)6(

)5(

)4(

Script file: Power_eig.mScript file: Power_eig.m

xAxNorm

» A=[2 8 10; 8 3 4; 10 4 7]A = 2 8 10 8 3 4 10 4 7» [z,m] = Power_eig(A,100,0.001);

it m z(1) z(2) z(3) z(4) z(5) 1.0000 21.0000 0.9524 0.7143 1.0000 2.0000 19.3810 0.9091 0.7101 1.0000 3.0000 18.9312 0.9243 0.7080 1.0000 4.0000 19.0753 0.9181 0.7087 1.0000 5.0000 19.0155 0.9206 0.7084 1.0000 6.0000 19.0396 0.9196 0.7085 1.0000 7.0000 19.0299 0.9200 0.7085 1.0000 8.0000 19.0338 0.9198 0.7085 1.0000 9.0000 19.0322 0.9199 0.7085 1.0000error = 8.3175e-004» zz = 0.9199 0.7085 1.0000» mm = 19.0322

» x=eig(A)x = -7.7013 0.6686 19.0327

MATLAB MATLAB Example:Example:

Power Power MethodMethod

eigenvector

eigenvalue

MATLAB function

MATLAB’s MethodsMATLAB’s Methods

• e = eig(A) gives eigenvalues of A

• [V, D] = eig(A) eigenvectors in V(:,k) eigenvalues = Dii (diagonal matrix D)

• [V, D] = eig(A, B) (more general eigenvalue problems) (Ax = Bx)

AV = BVD

Theorem: If A has a complete set of eigenvectors, then the Power method converges to the dominate eigenvalue of the matrix A.

Proof: A has n eigenvalues 1,2,3,…,n with 1>2>3>…>n with a corresponding basis of eigenvectors w1,w2,w3,…,wn. Let the initial vector w0 be a linear combination of the vectors w1,w2,w3,…,wn.

w0 = a1w1+a2w2+a3w3+…+anwn

Aw0 = A(a1w1+a2w2+a3w3+…+anwn)

=a1Aw1+a2Aw2+a3Aw3+…+anAwn

=a11w1+a22w2+a33w3+…+annwn

Akw0 =a1(1)kw1+a2(2)kw2+…+an(n)kwn

Akw0/(1)k-1 =a1(1)k /(1)k-1 w1 +…+an(n)k /(1)k-1 wn

n

k

nnn

kk

k

k

aaaa wwwwwA1

13

1

1

3332

1

1

2221111

1

0

For large values of k (as k goes to infinity) we get the following:

1,,1,1:since11

3

1

21111

1

0

n

k

k

a wwA

At each stage of the process we divide by the dominant term of the vector. If we write w1 as shown to the right and consider what happens between two consecutive estimates we get the following.

nc

cc

2

1

1w

nn

k

k

nn

k

k

ca

caca

c

cc

aand

ca

caca

c

cc

a

211

2211

1211

2

1

211

1

01

11

211

111

2

1

1111

0

wAwA

Dividing by the dominant term gives something that is approximately 1.