Вы находитесь на странице: 1из 17

Triangular

Factorization
WEEK 2
𝑎11 𝑎12 𝑎13
𝐴 = 𝑎21 𝑎22 𝑎23
𝑎31 𝑎32 𝑎33
. . .
. 0 0
𝐿= . . 0 U= 0 . .
0 0 .
. . .

𝐴 = 𝐿𝑈
• These are called the lower and upper triangular
matrices because they have zero elements above and
below their diagonals respectively.
• This is also known as LU decomposition.
• The entries in L and U matrix are formed by
systematically recording the outcome of the
calculations at each step of a single pass through
the gaussian elimination method.
In every step those values which are
eliminated and are not altered are recorded
in L matrix.
In every step those values which are
generated and then are not altered are
recorded in U matrix

1 −1 1 𝑥1 6 1 0 0 1 −1 1
3 4 2 𝑥2 = 9 𝐿= 3 . 0 U= 0 . .
2 1 1 𝑥3 7 2 . . 0 0 .
𝐴𝑥 = 𝑏

1 −1 1 𝑥1 6 1 0 0 1 −1 1
0 7 −1 𝑥2 = − 9 𝐿= 3 7 0 U= 0 1 −7
1

0 3 −1 𝑥3 −5 2 3 .
0 0 .
1 −1 1 𝑥 6 1 0 0 1 −1 1
1 1
0 7 −1 𝑥 −9 𝐿= 3 7 0 U= 0 1 −7
2 =
4 8 2 3 . 0 0 .
0 0 − 𝑥3 −
7 7

1 0 0 1 −1 1
3 7 0 1
𝐿= U= 0 1 −7
4
2 3 − 0 0 1
7
𝐴 = 𝐿𝑈

Enter this code in Matlab


L=[ 1 0 0; 3 7 0; 2 3 -4/7]
U=[1 -1 1; 0 1 -1/7; 0 0 1]
A=L*U
𝐴𝑥 = 𝑏
𝐿𝑈𝑥 = 𝑏
As an intermediate step we replace Ux by x’, now
𝐿𝑥 ′ = 𝑏 𝑎𝑛𝑑 𝑈𝑥 =x’
1 −1 1 𝑥1 6
3 4 2 𝑥2 = 9
2 1 1 𝑥3 7
1 0 0 1 −1 1 𝑥1 6
3 7 0 0 1
1 −7 𝑥2 = 9
4
2 3 −7 0 0 1 𝑥3 7

X’
1 0 0 𝑥1′ 6
3 7 0 𝑥′ = 9 Use forward substitution to find 𝑥1′ , 𝑥2′ 𝑎𝑛𝑑 𝑥3′ .
4 2
2 3 − 7 𝑥3′ 7

𝑥1′ 6 1 −1 1 𝑥1 𝑥1′
9 1
𝑥2′ = − 0 1 −7 𝑥2 = 𝑥2′
7 𝑥3
𝑥3′ 2 0 0 1 𝑥3′
1 −1 1 𝑥1 6
1
0 1 −7 𝑥2 = − 9
7
0 0 1 𝑥3 2
𝑥1 3
𝑥2 = −1
𝑥3 2

Advantage of LU decomposition

1 −1 1 𝑥1 6
3 4 2 𝑥2 = 9
2 1 1 𝑥3 7

1 0 0 1 −1 1 𝑥1 6
3 7 0 0 1
1 −7 𝑥2 = 9
4
2 3 −7 0 0 1 𝑥3 7

X’
• Different operating condition in power system.
• Changes made to external sources connected at the
system buses.
• The network configuration and parameter remain the
same and the operating conditions differ only.
• Bus admittance matrix of the network remains the
same.
• Voltages have to be recalculated.
• Computational effort in gaussian elimination.
• This can be avoided by representing the bus
admittance matrix as product of two matrices.
• 𝑌𝐵𝑢𝑠 is represented as product of two matrices. The
L and U matrix.
𝐿𝑈 = 𝑌𝑏𝑢𝑠
• Consider the four- bus system with coefficient
matrix.

1 𝒀𝟏𝟐 𝒀𝟏𝟑 𝒀𝟏𝟒


𝒀𝟏𝟏 𝒀𝟏𝟏 𝒀𝟏𝟏

1 𝑌11 𝑌12 𝑌13 𝑌14


0 𝑌21 𝑌22 𝑌23 𝑌24
0 𝑌31 𝑌32 𝑌33 𝑌34
0 𝑌41 𝑌42 𝑌43 𝑌44
In every step those values which In every step those values which
are eliminated and are not altered are generated and then are not
are recorded in L matrix. altered are recorded in U matrix

𝑌11 0 0 0 𝑌12 𝑌13 𝑌14


𝑌21 . 0 0 1
𝑌11 𝑌11 𝑌11
𝑌31 . . 0 0 . . .
𝑌41 . . . 0 0 . .
0 0 0 .

𝑌12 𝑌13 𝑌14


1
𝑌11 𝑌11 𝑌11
(1) (1) (1)
0 𝑌22 𝑌23 𝑌24
(1) (1) (1)
0 𝑌32 𝑌33 𝑌34
(1) (1) (1)
0 𝑌42 𝑌43 𝑌44
𝑌12 𝑌13 (1)
𝑌23 𝑌14 (1)
𝑌24
1 1
(1)
𝑌22 (1)
𝑌11 𝑌11 𝑌11 𝑌22

(1) (1) (1)


0 𝑌22 𝑌23 𝑌24
1 (1) (1) (1)
0 𝑌32 𝑌33 𝑌34
0
(1) (1) (1)
0 𝑌42 𝑌43 𝑌44
0
In every step those values which In every step those values which
are eliminated and are not altered are generated and then are not
are recorded in L matrix. altered are recorded in U matrix

𝑌12 𝑌13 𝑌14


1
𝑌11 𝑌11 𝑌11
(1) (1)
𝑌11 0 0 0 𝑌23 𝑌24
(1) 0 1 (1) (1)
𝑌21 𝑌22 0 0 𝑌22 𝑌22
(1) 0 0 . .
𝑌31 𝑌32 . 0
(1) 0 0 0 .
𝑌41 𝑌42 . .

𝑌12 𝑌13 𝑌14


1
𝑌11 𝑌11 𝑌11
(1) (1)
𝑌23 𝑌24
0 1 (1) (1)
𝑌22 𝑌22
(2) (2)
0 0 𝑌33 𝑌34
(2) (2)
0 0 𝑌43 𝑌44
𝑌12 𝑌13 𝑌14
1
𝑌11 𝑌11 𝑌11
(1) (1)
𝑌23 𝑌24
0 1 (1) 1 (1)
(2)
𝑌34

𝑌22 𝑌22 (2)


𝑌33

(2) (2)
1
0 0 𝑌33 𝑌34
(2) (2)
0 0 𝑌43 𝑌44
0
In every step those values which In every step those values which
are eliminated and are not altered are generated and then are not
are recorded in L matrix. altered are recorded in U matrix

𝑌12 𝑌13 𝑌14


1
𝑌11 𝑌11 𝑌11
(1) (1)
𝑌11 0 0 0 𝑌23 𝑌24
(1) 0 1 (1) (1)
𝑌21 𝑌22 0 0 𝑌22 𝑌22
(1) (2) (2)
𝑌31 𝑌32 𝑌33 0 𝑌34
(1) (2) 0 0 1 (2)
𝑌41 𝑌42 𝑌43 . 𝑌33
0 0 0 .

𝑌12 𝑌13 𝑌14


1
𝑌11 𝑌11 𝑌11
(1) (1)
𝑌23 𝑌24
0 1 (1) (1)
𝑌22 𝑌22
(2)
𝑌34
0 0 1 (2)
𝑌33
(3)
0 0 0 𝑌44
𝑌12 𝑌13 𝑌14
1
𝑌11 𝑌11 𝑌11
(1) (1)
𝑌23 𝑌24
0 1 (1) (1)
𝑌22 𝑌22
(2)
𝑌34
0 0 1 (2)
𝑌33
(3)
0 0 0 𝑌44
1
In every step those values which In every step those values which
are eliminated and are not altered are generated and then are not
are recorded in L matrix. altered are recorded in U matrix

𝑌12 𝑌13 𝑌14


1
𝑌11 0 0 0 𝑌11 𝑌11 𝑌11
(1) (1)
𝑌21
(1)
𝑌22 0 0 𝑌23 𝑌24
0 1 (1) (1)
𝑌31
(1)
𝑌32
(2)
𝑌33 0 𝑌22 𝑌22
(2)
𝑌41
(1)
𝑌42
(2)
𝑌43
(3)
𝑌44 𝑌34
0 0 1 (2)
𝑌33
0 0 0 1
Application of LU matrix

• 𝑌𝑏𝑢𝑠 𝑉 = 𝐼
•𝐿𝑈𝑉 =𝐼
N by 1 matrix

N by N matrix
N by N matrix

• As an intermediate step we replace the


product UV by a new vector V‘ such that
• 𝐿𝑉 ′ = 𝐼 and 𝑈𝑉 = 𝑉 ′

Вам также может понравиться