SlideShare a Scribd company logo
1 of 83
Download to read offline
12/12/2022
1
ECEG 6011
Advanced
Power System Analysis
Chapter1: Solution Techniques
Dr.M.Karthikeyan
Dept. of Electrical and Computer Engineering
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 1
12/12/2022
2
SPARSE MATRIX
• In numerical analysis and scientific computing, a sparse
matrix or sparse array is a matrix in which most of the elements are
zero.
• A matrix is characterized as sparse, whenever a significant
percentage of it's elements are equal to zero. The admittance or
Y matrix of a power system is relatively sparse, whereas the Z of
impedance matrix of the same system is proportionately full, i.e. very
few zero elements.
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 2
12/12/2022
3
Why do use SPARSE MATRIX
• Using sparse matrices to store data that contains a large number of
zero-valued elements can both save a significant amount of memory
and speed up the processing of that data. sparse is an attribute that
you can assign to any two-dimensional MATLAB® matrix that is
composed of double or logical elements.
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 3
12/12/2022
4
Y-bus is a sparse matrix
• The Y-bus is a sparse matrix. For a large power system, more than
90% of off-diagonal elements are zero. This is due to the fact that in
power system networks each node (bus) is connected to not more than
three nodes.
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 4
12/12/2022
5
TYPES OF SPARSE MATRIX
• csc_matrix: Compressed Sparse Column format.
• csr_matrix: Compressed Sparse Row format.
• bsr_matrix: Block Sparse Row format.
• lil_matrix: List of Lists format.
• dok_matrix: Dictionary of Keys format.
• coo_matrix: COOrdinate format (aka IJV, triplet format)
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 5
12/12/2022
6
SPARSE MATRIX IN
DATA STRUCTURE
• Sparse matrix is a matrix which contains very few non-zero
elements. When a sparse matrix is represented with a 2-
dimensional array, we waste a lot of space to represent that matrix.
For example, consider a matrix of size 100 X 100 containing only 10
non-zero elements.
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 6
12/12/2022
7
ADVANTAGES OF SPARSE MATRIX
The advantages of sparse matrices are size and speed.
A 5000 by 5000 matrix in full storage requires space for 25 million
complex numbers even if only 50,000 are nonzero. The same 50,000-
nonzero element matrix, in sparse storage, would store 50,000 complex
numbers and 50,000 pairs of integer indices.
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 7
12/12/2022
8
REPRESENTATION OF
SPARSE MATRIX
• Two methods of representation:
• 1. Array Representation
• 2. Linked Lists Representation
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 8
12/12/2022
9
Sparse Matrix Techniques for
Large Scale Power System
Linear System Solution – Introduction
• A problem that occurs in many is fields is the solution of linear
systems Ax = b where A is an n by n matrix with elements aij, and x
and b are n-vectors with elements xi and bi respectively
• In power systems we are particularly interested in systems when n is
relatively large and A is sparse
• How large is changing
• A matrix is sparse if a large percentage of its elements have zero
values
• Goal is to understand the computational issues (including complexity) associated
with the solution of these systems
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 9
12/12/2022
10
Linear system – contd.,
• Sparse matrices arise in many areas, and can have domain specific
structures
• Symmetric matrices
• Structurally symmetric matrices
• Tridiagnonal matrices
• Banded matrices
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 10
12/12/2022
11
Symmetric Matrix
• A symmetric matrix in linear algebra is a square matrix that remains
unaltered when its transpose is calculated.
• That means, a matrix whose transpose is equal to the matrix itself, is
called a symmetric matrix.
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 11
12/12/2022
12
Structurally Symmetric Matrix
• A structurally symmetric sparse matrix has nonzero values with the
property that if a(i, j) 0, then a(j, i) 0 for all i and j.
• When solving a structurally symmetric system, the entire matrix must
be passed to the solver routines.
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 12
12/12/2022
13
Tridiagonal Matrix
• A tridiagonal matrix is a matrix that has non-zero elements only at
the main diagonal, diagonal below and above it.
• All other elements are zero.
• For this reason tridiagonal matrices of dimension smaller than or equal
to 3 seem meaningless.
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 13
12/12/2022
14
Banded Matrix
• A banded matrix is a matrix whose only nonzero elements lie on
diagonal bands above and/or below the main diagonal.
• The number of nonzero diagonals above the main diagonal is called
the upper bandwidth.
• The number of nonzero diagonals below the main diagonal is called
the lower bandwidth.
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 14
12/12/2022
15
Sparse Systems
• The material presented so far applies to any arbitrary linear system
• The next step is to see what happens when we apply triangular
factorization to a sparse matrix
• For a sparse system, only nonzero elements need to be stored in the
computer since no arithmetic operations are performed on the 0’s.
• The triangularization scheme is adapted to solve sparse systems in
such a way as to preserve the sparsity as much as possible
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 15
12/12/2022
16
Inverse of a Sparse Matrix
• The inverse of a sparse matrix is NOT in general a sparse matrix
• We never (or at least very, very, very seldom) explicitly invert a
sparse matrix
• Individual columns of the inverse of a sparse matrix can be
obtained by solving x = A-1b with b set to all zeros except for a
single nonzero in the position of the desired column
• If a few desired elements of A-1 are desired (such as the
diagonal values) they can usually be computed quite efficiently
using sparse vector methods (a topic we’ll be considering soon)
• We can’t invert a singular matrix (with sparse or not)
16
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
17
Computer Architecture Impacts
• With modern computers the processor speed is many times faster
than the time it takes to access data in main memory
• Some instructions can be processed in parallel
• Caches are used to provide quicker access to more commonly used
data
• Caches are smaller than main memory
• Different cache levels are used with the quicker caches, like
L1, have faster speeds but smaller sizes; L1 might be 64K,
whereas the slower L2 might be 1M
• Data structures can have a significant impact on sparse matrix
computation
17
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
18
Full Matrix versus
Sparse Matrix Storage
• Full matrices are easily stored in arrays with just one variable
needed to store each value since the value’s row and column are
implicitly available from its matrix position
• With sparse matrices two or three elements are needed to store
each value
• The zero values are not explicitly stored
• The value itself, its row number and its column number
• Storage can be reduced by storing all the elements in a
particular row or column together
• Because large matrices are often quite sparse, the total storage is
still substantially reduced
18
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
19
Sparse Matrix Usage Can Determine the
Optimal Storage
• How a sparse matrix is used can determine the best storage scheme
to use
• Row versus column access; does structure change
• Is the matrix essentially used only once? That is, its structure and
values are assumed new each time used
• Is the matrix structure constant, with its values changed
• This would be common in the N-R power flow, in which the
structure doesn’t change each iteration, but its values do
• Is the matrix structure and values constant, with just the b vector in
Ax=b changing
• Quite common in transient stability solutions
19
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
20
General Sparse Matrix Storage
• A general approach for storing a sparse matrix would be using three
vectors, each dimensioned to number of elements
• AA: Stores the values, usually in power system analysis as
double precision values (8 bytes)
• JR: Stores the row number; for power problems usually as an
integer (4 bytes)
• JC: Stores the column number, again as an integer
• If unsorted then both row and column are needed
• New elements could easily be added, but costly to delete
• Unordered approach doesn’t make for good computation since
elements used next computationally aren’t necessarily nearby
• Usually ordered, either by row or column
20
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
21
Sparse Storage Example
• Assume
• Then
21
5 0 0 4
0 4 0 3
0 0 3 2
4 3 2 10

 
 

 


 
 
  
 
A
 
 
 
5 4 4 3 3 2 4 3 2 10
1 1 2 2 3 3 4 4 4 4
1 4 2 4 3 4 1 2 3 4
      


AA
JR
JC
Note, this example is a symmetric matrix, but the technique is general
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
22
Compressed Sparse Row Storage
• If elements are ordered (as was case for previous example)
storage can be further reduced by noting we do not need to
continually store each row number
• A common method for storing sparse matrices is known as the
Compressed Sparse Row (CSR) format
• Values are stored row by row
• Has three vector arrays:
• AA: Stores the values as before
• JA: Stores the column index (done by JC in previous
example)
• IA: Stores the pointer to the index of the beginning of
each row
22
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
23
CSR Format Example
• Assume as before
• Then
23
5 0 0 4
0 4 0 3
0 0 3 2
4 3 2 10

 
 

 


 
 
  
 
A
 
 
 
5 4 4 3 3 2 4 3 2 10
1 4 2 4 3 4 1 2 3 4
1 3 5 7
      


AA
JA
IA
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
24
CSR Comments
• The CSR format reduces the storage requirements by taking
advantage of needing only one element per row
• The CSR format has good advantages for computation when using
cache since (as we shall see) during matrix operations we are
often sequentially going through the vectors
• An alternative approach is Compressed Sparse Column (CSC),
which identical, except storing the values by column
• It is difficult to add values.
• We’ll mostly use the linked list approach here, which makes
matrix manipulation simpler
24
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
25
Linked Lists: Classes and Objects
• In explaining the linked list approach it is helpful to use the concepts
from object oriented programming (OOP) of classes and objects
• Approach can also be used in non-OOP programming
• OOP can be thought of as a collection of objects interacting with each
other
• Objects are instances of classes.
• Classes define the object fields and actions (methods)
• We’ll define a class called sparse matrix element, with fields of value,
column and next; each sparse matrix element is then an object of this
class
25
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
26
Linked Lists
• A linked list is just a group of objects that represent a sequence
• We’ll used linked lists to represent a row or column of a sparse matrix
• Each linked list has a head pointer that points to the first object in the
list
• For our sparse matrices the head pointer will be a vector of the rows or
columns
26
Column a
Value a
Next a
Column b
Value b
Next b
Column c
Value c
Nil
Head
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
27
Sparse Matrix Storage with
Linked Lists by Rows
• If we have an n by n matrix, setup a class called T sparse Element with
fields column, value and next
• Setup an n-dimensional head pointer vector that points to the first
element in each row
• Each nonzero corresponds to an object of class (type) T Sparse
Element
• We do not need to store the row number since it is given by the
object’s row
• For power system sparse matrices, which have nonzero diagonals, we
also have a header pointer vector that points to the diagonal objects
27
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
28
Fills
• When doing a factorization of a sparse matrix some values that were
originally zero can become nonzero during the factorization process
• These new values are called “fills”
(some call them fill-ins)
• For a structurally symmetric matrix the fill occurs for both the element
and its transpose value (i.e., Aij and Aji)
• How many fills are required depends on how the matrix is ordered
• For a power system case this depends on the bus ordering
28
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 28
12/12/2022
29
Fills
• There are two key issues associated with fills
• Adding the fills
• Ordering the matrix elements (buses in our case) to reduce the
number of fills
• The amount of computation required to factor a sparse
matrix depends upon the number of non-zeros in the
original matrix, and the number of fills added
• How the matrix is ordered can have a dramatic impact on
the number of fills, and hence the required computation
• Usually a matrix cannot be ordered to totally eliminate
fills
29
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 29
12/12/2022
30
Fill Examples
4
1 2 3
1
2 3 4
5 0 0 4
0 4 0 3
0 0 3 2
4 3 2 10

 
 

 


 
 
  
 
A
10 4 3 2
4 5 0 0
3 0 4 0
2 0 0 3
  
 
 

 


 
 

 
B
No Fills Required Fills Required (matrix becomes full)
30
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 30
12/12/2022
31
Example: 7 by 7 Matrix
• Consider the 7 x 7 matrix A with the zero-nonzero
pattern shown in (a): of the 49 possible elements
there are only 31 that are nonzero
• If elimination proceeds with the given ordering, all
but two of the 18 originally zero entries, will fill in,
as seen in (b)
31
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
32
1 2 3 4 5 6 7
1 X X X X X X
2 X X X X X
3 X X X X X
4 X X X
5 X X X X
6 X X X X X
7 X X X
(a) the original zero-
nonzero structure
1 2 3 4 5 6 7
1 X X X X X X
2 X X X F F X X
3 X X X F F X X
4 X F F X X F F
5 X F F X X X F
6 X X X F X X F
7 X X F F F X
(b) the post- elimination
zero-nonzero pattern
r
c
r
c
32
Example: 7 by 7 Matrix Structure
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
33
• We next reorder the rows and the columns of A so as to
result in the pattern shown in (c)
• For this reordering, we obtain no fills, as shown in the
table of factors given in (d )
• In this way, we preserve the original sparsity of A
33
Example: 7 by 7 Matrix Reordering
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
34
4 5 1 6 7 3 2
4 X X X
5 X X X X
1 X X X X X X
6 X X X X X
7 X X X
3 X X X X X
2 X X X X X
(c) the reordered system
4 5 1 6 7 3 2
4 X X X
5 X X X X
1 X X X X X X
6 X X X X X
7 X X X
3 X X X X X
2 X X X X X
(d) the post- elimination
reordered system
r
c
r
c
34
Example: 7 by 7 Matrix Reordered Structure
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
35
• For structurally symmetric matrices we can gain good
insights into the problem by examining the graph-
theoretic interpretation of the triangularization process
• This assumption involves essentially no loss in
generality since if Aij  0 but Aji = 0 we simply treat Aji
as a nonzero element with the value 0; in this way, we
ensure that A has a symmetric structure
• We term a matrix as structurally symmetric whenever it
has a symmetric zero-nonzero pattern
Fills for Structurally Symmetric
Matrices
35
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
36
• We make use of graph theoretic notions to develop a practical
reordering scheme for sparse systems
• We associate a graph G with the zero-nonzero structure of the n
by n matrix A
• We construct the graph G associated with the matrix A as
follows:
i. G has n nodes corresponding to the dimension n of the
square matrix: node i represents both the column i and the
row i of A;
ii. a branch (k, j) connecting nodes k and j exists if and only if
the element Ajk (and, by structural symmetry, Akj) is nonzero;
the self loop corresponding to Akk is not represented
36
Graph Associated with A
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
37
• We consider the simple linear resistive network
with the topology shown below
 1
s
 2
s
 4
s  3
s
37
Example: Linear Resistive Network
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
38
• The corresponding loop impedance matrix has the
following zero - nonzero pattern:
1 2 3 4
1 X X 0 X
2 X X X 0
3 0 X X X
4 X 0 X X
r
c
38
Example: Linear Resistive Network
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
39
• The associated 4-node graph of the matrix is
• We next illustrate the graphical interpretation of the
elimination process with another example
1 2
3 4
39
Example: Linear Resistive Network
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 39
12/12/2022
40
Example: 5 by 5 System
• Suppose that A has the zero-nonzero pattern
1 2 3 4 5
1 X X X X
2 X X X
3 X X X
4 X X X X
5 X X X
r
c
40
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 40
12/12/2022
41
Example: 5 by 5 System
• Then, the associated graph G is
1 2
3
4
5
41
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 41
12/12/2022
42
• The graph-theoretic interpretation of the elimination of
the node (bus) j is as follows
• The deletion of the node j involves all its incident
branches (k, j) and ( j, k) connected to j, kj
• In the pre-elimination graph of the eliminated node j,
the elimination of the branches ( j, k) and (l, j) results
in the addition of the new branch (k, l), if one does not
already exist
Graph-Theoretic Interpretation
42
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
43
• We eliminate the Bus (Node) 1 variable with the
resulting zero-nonzero pattern as shown the array
bordered by the broken
lines with on the new graph
new G1
1 2 3 4 5
1 X X X X
2 X X X F F
3 X X X
4 X F X X X
5 X F X X
r
c
43
Example: 5 by 5 System
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
44
Graph G1
• We obtain the graph G1 from G by removing Bus 1 with
the new added branches (2, 4) and (2, 5) corresponding
to the fills
5 2
4 3
new branch
44
Example: 5 by 5 System
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
45
• The elimination of Bus 2 results in the
submatrix shown below
3 4 5
3 X X F
4 X X X
5 F X X
r
c
45
Example: 5 by 5 System
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
46
with the corresponding graph G2
• The elimination of Bus 3 yields
5
4 3
4 5
4 X X
5 X X
r
c
46
Example: 5 by 5 System
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
47
with the corresponding graph G3
• Finally, upon Bus 4 we have
• and the corresponding G4 is simply the point
5
5 X
5
4
5
r
c
47
Example: 5 by 5 System
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
48
• We next examine how we may reorder the rows and
columns of A to preserve its sparsity, i.e., to
minimize the number of fills
• Eventually we’ll introduce an algorithm to try to
minimize the fills
• This is motivated by revisiting the graph G
1 2
3
4
5
Reording the Rows/Columns
48
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
49
• To minimize the number of fills, i.e., the number of
new branches in G, we eliminate first the node
which upon deletion introduces the least number of
new branches
• This is node 5 and upon deletion no new branches
are added and the resulting graph G1 is
1
4
2
3
49
Reording Motivating Example
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
50
• The structure of G1 is such that any one of the
remaining nodes may be chosen as the next node to be
eliminated since each of the 4 remaining nodes
introduces a new branch after its elimination
• We arbitrarily pick node 1 and we obtain the graph G2
• We continue with the next three choices arbitrary,
resulting in no new fills
2
3
4
new branch
50
Reordering Motivating Example
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
51
• We may relabel the original graph in such a way that
the label of the node refers to the order in which it is
eliminated
• Thus we renumber the nodes as shown below
1
2 3
4
5
51
Reordering Motivating Example
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
52
• Clearly, relabeling the nodes corresponds to reordering
the rows and columns of A
• For the reordered system, the zero-nonzero pattern of A
is
1 2 3 4 5
1 X X X
2 X X X X
3 X X X
4 X X X
5 X X X X
r
c
52
Reordering Motivating Example
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
53
and of its table of factors has the zero-nonzero
structure
Compared to the original ordering scheme, the new
ordering scheme has saved us 4 fill-ins
1 2 3 4 5
1 X X X
2 X X X X
3 X X X F
4 X X X
5 X X F X X
r
c
53
Reordering Motivating Example
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
54
• The associated graph of the structurally symmetric
matrix A is useful in gaining insights into the
factorization process
• We make the following observations
• If A is originally structurally symmetric, then it
remains so in all the steps of the factorization;
• A good ordering scheme is independent of the
values of the elements of A and depends only on
its the zero-nonzero pattern
54
General Findings
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
55
Sparse Vector Methods
• Sparse vector methods are useful for cases in solving Ax=b in which
• A is sparse
• b is sparse
• only certain elements of x are needed
• In these right circumstances sparse vector methods can result in
extremely fast solutions!
• A common example is to find selected elements of the inverse of A,
such as diagonal elements.
55
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 55
12/12/2022
56
Sparse Vector Methods Introduced
• Assume we are solving Ax = b with A factored so we solve LUx = b
by first doing the forward substitution to solve Ly = b and then the
backward substitution to solve Ux = y
• A key insight: In the solution of Ly = b if b is sparse then only certain
columns of L are required, and y is often sparse
y1
.
.
.
yn
.
.
.
x
.
.
.
x
.
.
.
x
=
56
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 56
12/12/2022
57
Fast Forward Substitution
• If b is sparse, then the fast forward (FF) substitution takes advantage
of the fact that we only need certain columns of L
• We define {FF} as the set of columns of L needed for the solution of
Ly = b; this is equal to the nonzero elements of y
• In general the solution of Ux = y will NOT result in x being a sparse
vector
• However, oftentimes only certain elements of x are desired
• E.g., the sensitivity of the flows on certain lines to a change in generation at a
single bus; or a diagonal of A-1
57
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 57
12/12/2022
58
Fast Backward Substitution
• In the case in which only certain elements of x are
desired, then we only need to use certain rows in U
below the desired elements of x; define these columns as
{FB}
• This is known as a fast backward substitution (FB),
which is used to replace the standard backward
substitution .
.
.
x
.
.
.
x
.
.
.
x
.
.
y1
y2
.
.
.
yn
=
58
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 58
12/12/2022
59
Factorization Paths
• We observe that
• {FF} depends on the sparsity structures of L and b
• {FB} depends on the sparsity structures of U and x
• The idea of the factorization path provides a systematic way to
construct these sets
• A factorization path is an ordered set of nodes associated with the
structure of the matrix
• For FF the factorization path provides an ordered list of the columns
of L
• For FB the factorization path provides an ordered list of the rows of U
59
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 59
12/12/2022
60
Gaussian Elimination
• The best known and most widely used method for
solving linear systems of algebraic equations is
attributed to Gauss
• Gaussian elimination avoids having to explicitly
determine the inverse of A, which is O(n3)
• Gaussian elimination can be readily applied to sparse
matrices
• Gaussian elimination leverages the fact that scaling a
linear equation does not change its solution, nor does
adding on linear equation to another
1 2 1 2
2 4 10 2 5
x x x x
    
60
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
61
Gaussian Elimination, cont.
• Gaussian elimination is the elementary procedure in
which we use the first equation to eliminate the first
variable from the last n-1 equations, then we use the
new second equation to eliminate the second variable
from the last n-2 equations, and so on
• After performing n-1 such eliminations we end up with
a triangular system which is easily solved in a
backward direction
61
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
62
Example 1
• Solve the equations using Gauss Elimination Method.
3x1 + 12x3 = 15 3 0 12 x1 = 15
6x2 + 12x3 = 15 0 6 12 x2 15
3x1 + 10x2 + 16x3 = 24 or 3 10 16 x3 24
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 62
12/12/2022
63
Triangular Decomposition
• In this example, we have:
• triangularized the original matrix by
Gaussian elimination using column elimination
• then, we used back substitution to solve the
triangularized system
• The following slides present a general scheme for
triangular decomposition by Gaussian elimination
• The assumption is that A is a nonsingular matrix
(hence its inverse exists)
• Gaussian elimination also requires the diagonals to be
nonzero; this can be achieved through ordering
• If b is zero then we have a trivial solution x = 0
63
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
64
Triangular Decomposition
• We form the matrix Aa using A and b with
and show the steps of the triangularization scheme
 
 
 
 
 
 
 
 
 
 
 
 
 
11 12 1 1
21 22 2 2
31 32 3 3
1 2



    

n
n
n
n n nn n
a a a b
a a a b
a a a b
a a a b
   
  
   
   

 
a  
A A b

64
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
65
Triangular Decomposition, Step 1
• Step 1: normalize the first equation

1
(1)
1
11
1
(1)
1
11
= 2 ...
=
j
j
a
a j , ,n
a
b
b
a
65
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
66
Triangular Decomposition, Step 2
• Step 2: a) eliminate x1 from row 2:
• Step 2: b) normalize the second equation
66
,

(1) (1)
2 2 21 1 2 ...
j j j
a = a a a j = , ,n

(1) (1)
2 2 21 1
b = b a b
,
(1)
2
(2)
2 (1)
22
3 ...
j
j
a
a = j = , ,n
a
(1)
2
(2)
2 (1)
22
b
b =
a
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
67
Triangular Decomposition, Step 2
and we end up at the end of step 2 with
 
 
 
 
 
 
 
 
 
 
 
 
(1 ) (1 ) (1 ) (1 )
1 2 1 3 1 1
(2 ) (2 ) (2 )
2 3 2 2
3 1 3 2 3 3 3 3
1 2 3
1
1



     

n
n
n
n n n n n n
a a a b
0 a a b
a a a a b
a a a a b
67
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
68
Triangular Decomposition, Step 3
• Step 3: a) eliminate x1 and x2 from row 3:
• Step 3: b) normalize the third equation:
2
 
( ) (1) (1) (2)
3 3 32 2 3 ...
j j j
a a a a j = , ,n

(1) (1)
3 3 31 1 2
j j j
a = a a a j = , ... ,n

(1) (1)
3 3 31 1
b = b a b

(2) (1) (1) (2)
3 3 32 2
b = b a b
(2)
3
(3)
3 (2)
33
4 ...
j
j
a
a = j = , ,n
a
(2)
3
(3)
3 (2)
33
b
b =
a
68
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
69
Triangular Decomposition, Step 3
and we have the system at the end of step 3
 
 
 
 
 
 
 
 
 
 
 
(1) (1) (1) (1) (1)
12 13 14 1 1
(2) (2) (2) (2)
21 24 2 2
(3) (3) (3)
34 3 3
41 42 43 44 4 4
1 2 3 4
1
1
1




      

n
n
n
n
n n n n nn n
a a a a b
0 a a a b
0 0 a a b
a a a a a b
a a a a a b
69
12/12/2022
70
Triangular Decomposition, Step k
• In general, we have for step k:
a) eliminate from row k:
b) normalize the kth equation:
 

1 1
1 ...
(m) (m ) (m ) (m)
kj kj km mj
a = a a a j = m + , ,n
, , ,
1 2 1
... k
x x x 
 

1 1
1 2 ... 1
(m) (m ) (m ) (m)
k k km m
b = b a b m = , , , k -


1
1
= = 1 ...
(k )
kj
(k)
kj (k )
kk
j
a
a k + , ,n
a


1
1
=
(k )
k
(k)
k (k )
kk
b
b
a
70
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
71
Triangular Decomposition:
Upper Triangular Matrix
• and proceed in this manner until we obtain the upper
triangular matrix (the nth derived system):
 
 
 
 
 
 
 
 
 
 
 
(1) (1) (1) (1) (1)
12 13 14 1n 1
(2)
(2) (2) (2)
21 24 2 2
(3)
(3) (3)
34 3 3
(4) (4)
4 4
1
1
1
1
1




      

n
n
n
(n)
n
a a a a b
0 a a a b
0 0 a a b
0 0 0 a b
0 0 0 0 b
71
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
72
Triangular Decomposition
• Note that in the scheme presented, unlike in the
first example, we triangularly decompose the
system by eliminating row-wise rather than
column-wise
• In successive rows we eliminate (reduce to 0) each
element to the left of the diagonal rather than those
below the diagonal
• Either could be used, but row-wise operations will
work better for power system sparse matrices
72
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
73
Example 2
• Solve for x in the system using OTF
• The three elimination steps are given on the next
slides; for simplicity, we have appended the r.h.s.
vector to the matrix
• First step is set the diagonal element of row 1 to 1 (i.e.,
normalize it)
1
2
3
4
2 3 1 0 20
6 5 0 2 45
2 5 6 6 3
4 2 2 3 30
x
x
x
x
  
   
 
   
  
 
   

  
 
   
 
   

   
 
73
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
74
Example 2, cont.
• Eliminate x1 by subtracting row 1 from all the rows
below it
1
1
2
multiply row by

1 2
3
multiply row by
and add to row

1 4
4
multiply row by
and add to row
1 6
2
multiply row by
and add to row
74
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
75
Example 2, cont.
• Eliminate x2 by subtracting row 2 from all the
rows below it
1
2
4
multiply row by
2 8
3
multiply row by
and add to row
2 4
4
multiply row by
and add to row




 
 
 
 
 
 
 
 
 
3 1
1 0 10
2 2
0 1
0 0 1 2 7
0 0 1 1 5
3 1 15
4 2 4
75
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
76
Example 2, cont.
• Elimination of x3 from row 3 and 4
3
4
subtract row
fromrow




 
 
 
 
 
 
 
 
 
3 1
1 0 10
2 2
0 1
0 0 1 2 7
0 0 0 1 2
3 1 15
4 2 4
76
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
77
Example 2, cont.
• Then, we solve for x by “going backwards”, i.e.,
using back substitution:
    
2 3 4 2
3 1 15
7
4 2 4
x x x x
 
4
2
x
   
3 4 3
2 7 3
x x x
    
1 2 3 1
3 1
10 1
2 2
x x x x
77
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
78
Solving for X
• To compute x we perform back substitution
   
   
 

  

1 1
1 1 1
1
=
= = 1 2 ... 1

n n
n- n- n- ,n n
n
k k
k k k j j
j=k+
x b a x
x b a x k n , n , ,
 

n
n n
x b
78
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
79
Upper Triangular Matrix
• The triangular decomposition scheme applied to the
matrix A results in the upper triangular matrix U with
the elements
• The following theorem is important in the development
of the sparse computational scheme







1 =
(i)
ij ij
i j
u = a j > i
0 j < i
79
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
80
LU Decomposition Theorem
• Any nonsingular matrix A has the following
factorization:
where U could be the upper triangular matrix
previously developed (with 1’s on its diagonals) and L
is a lower triangular matrix defined by
A = LU






1
=
(j )
i j
ij
a
0

j i

j i

80
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
81
LU Decomposition Application
• As a result of this theorem we can rewrite
• Can also be set so U has non unity diagonals
• Once A has been factored, we can solve for x by
first solving for y, a process known as forward
substitution, then solving for x in a process known
as back substitution
• In the previous example we can think of L as a
record of the forward operations preformed on b.
Define
Then
Ax = LUx = b
y = Ux
Ly = b
81
Presented by Dr.M.Karthikeyan, AP/ECE, WSU
12/12/2022
82
• A =LU Where
L = 1 0 0 U = U11 U12 U13
L21 1 0 0 U22 U23
L31 L32 1 0 0 U33
LU = U11 U12 U13
L21U11 L21U12+U22 L21U13+U23
L31U11 L31U12+L32U22 L31U13+L32U23+U33
Presented by Dr.M.Karthikeyan, AP/ECE, WSU 82
LU Decomposition Application
12/12/2022
83
Symmetric Matrix Factorization
• There are also some computational benefits from factoring symmetric
matrices. However, since symmetric matrices are not common in
power applications, we will not consider them in-depth
• However, topologically symmetric sparse matrices are quite common,
so those will be our main focus
83
Presented by Dr.M.Karthikeyan, AP/ECE, WSU

More Related Content

What's hot

Different method of frequency and voltage control
Different method of frequency and voltage controlDifferent method of frequency and voltage control
Different method of frequency and voltage control8141245710
 
Power systems voltage and power control
Power systems voltage and power controlPower systems voltage and power control
Power systems voltage and power controlCaner Göksel Sonuzun
 
power flow and optimal power flow
power flow and optimal power flowpower flow and optimal power flow
power flow and optimal power flowAhmed M. Elkholy
 
Symmetrical fault analysis problem
Symmetrical fault analysis problemSymmetrical fault analysis problem
Symmetrical fault analysis problemAsha Anu Kurian
 
Power system stability
Power  system  stabilityPower  system  stability
Power system stabilityrohit kumar
 
Modern power system planning new
Modern power system planning newModern power system planning new
Modern power system planning newBayu imadul Bilad
 
File 1 power system fault analysis
File 1 power system fault analysisFile 1 power system fault analysis
File 1 power system fault analysiskirkusawi
 
Economic load dispatch
Economic load  dispatchEconomic load  dispatch
Economic load dispatchDeepak John
 
Symmetrical and unsymmetrical faults
Symmetrical and unsymmetrical faultsSymmetrical and unsymmetrical faults
Symmetrical and unsymmetrical faultstahseen alshmary
 
POWER SYSTEM PLANNING
POWER SYSTEM PLANNINGPOWER SYSTEM PLANNING
POWER SYSTEM PLANNINGNishaDangi99
 
Switchgear and protection 4
Switchgear and protection 4Switchgear and protection 4
Switchgear and protection 4Md Irshad Ahmad
 
Saturated Reactor(SR) & Thyristor Controlled Reactor(TCR)
Saturated Reactor(SR)  & Thyristor Controlled Reactor(TCR)Saturated Reactor(SR)  & Thyristor Controlled Reactor(TCR)
Saturated Reactor(SR) & Thyristor Controlled Reactor(TCR)Pratheep M
 
DISTRIBUTED CONTROL OF HYBRID AC-DC MICROGRID WITH SOLAR ENERGY,ENERGY STORAG...
DISTRIBUTED CONTROL OF HYBRID AC-DC MICROGRID WITH SOLAR ENERGY,ENERGY STORAG...DISTRIBUTED CONTROL OF HYBRID AC-DC MICROGRID WITH SOLAR ENERGY,ENERGY STORAG...
DISTRIBUTED CONTROL OF HYBRID AC-DC MICROGRID WITH SOLAR ENERGY,ENERGY STORAG...kodibalasriram
 
Power System Simulation Lab (Formation of Y-Bus & Z-Bus Matrix)
Power System Simulation Lab (Formation of Y-Bus  & Z-Bus Matrix)Power System Simulation Lab (Formation of Y-Bus  & Z-Bus Matrix)
Power System Simulation Lab (Formation of Y-Bus & Z-Bus Matrix)Mathankumar S
 

What's hot (20)

Different method of frequency and voltage control
Different method of frequency and voltage controlDifferent method of frequency and voltage control
Different method of frequency and voltage control
 
Power systems voltage and power control
Power systems voltage and power controlPower systems voltage and power control
Power systems voltage and power control
 
power flow and optimal power flow
power flow and optimal power flowpower flow and optimal power flow
power flow and optimal power flow
 
Symmetrical fault analysis problem
Symmetrical fault analysis problemSymmetrical fault analysis problem
Symmetrical fault analysis problem
 
Power system stability
Power system stability Power system stability
Power system stability
 
Facts
FactsFacts
Facts
 
SYNCHRONOUS MACHINES
SYNCHRONOUS MACHINESSYNCHRONOUS MACHINES
SYNCHRONOUS MACHINES
 
Power system stability
Power  system  stabilityPower  system  stability
Power system stability
 
Modern power system planning new
Modern power system planning newModern power system planning new
Modern power system planning new
 
File 1 power system fault analysis
File 1 power system fault analysisFile 1 power system fault analysis
File 1 power system fault analysis
 
Economic load dispatch
Economic load  dispatchEconomic load  dispatch
Economic load dispatch
 
Symmetrical and unsymmetrical faults
Symmetrical and unsymmetrical faultsSymmetrical and unsymmetrical faults
Symmetrical and unsymmetrical faults
 
POWER SYSTEM PLANNING
POWER SYSTEM PLANNINGPOWER SYSTEM PLANNING
POWER SYSTEM PLANNING
 
Switchgear and protection 4
Switchgear and protection 4Switchgear and protection 4
Switchgear and protection 4
 
Upfc & fact
Upfc & factUpfc & fact
Upfc & fact
 
Saturated Reactor(SR) & Thyristor Controlled Reactor(TCR)
Saturated Reactor(SR)  & Thyristor Controlled Reactor(TCR)Saturated Reactor(SR)  & Thyristor Controlled Reactor(TCR)
Saturated Reactor(SR) & Thyristor Controlled Reactor(TCR)
 
DISTRIBUTED CONTROL OF HYBRID AC-DC MICROGRID WITH SOLAR ENERGY,ENERGY STORAG...
DISTRIBUTED CONTROL OF HYBRID AC-DC MICROGRID WITH SOLAR ENERGY,ENERGY STORAG...DISTRIBUTED CONTROL OF HYBRID AC-DC MICROGRID WITH SOLAR ENERGY,ENERGY STORAG...
DISTRIBUTED CONTROL OF HYBRID AC-DC MICROGRID WITH SOLAR ENERGY,ENERGY STORAG...
 
FACTS
FACTS FACTS
FACTS
 
Facts controller
Facts controllerFacts controller
Facts controller
 
Power System Simulation Lab (Formation of Y-Bus & Z-Bus Matrix)
Power System Simulation Lab (Formation of Y-Bus  & Z-Bus Matrix)Power System Simulation Lab (Formation of Y-Bus  & Z-Bus Matrix)
Power System Simulation Lab (Formation of Y-Bus & Z-Bus Matrix)
 

Similar to Chapter 1 Solution Techniques.pdf

DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
DSP IEEE paper
DSP IEEE paperDSP IEEE paper
DSP IEEE paperprreiya
 
Cerebellar Model Articulation Controller
Cerebellar Model Articulation ControllerCerebellar Model Articulation Controller
Cerebellar Model Articulation ControllerZahra Sadeghi
 
Learning Theory 101 ...and Towards Learning the Flat Minima
Learning Theory 101 ...and Towards Learning the Flat MinimaLearning Theory 101 ...and Towards Learning the Flat Minima
Learning Theory 101 ...and Towards Learning the Flat MinimaSangwoo Mo
 
A survey of indexing techniques for sparse matrices
A survey of indexing techniques for sparse matricesA survey of indexing techniques for sparse matrices
A survey of indexing techniques for sparse matricesunyil96
 
generalized_nbody_acs_2015_challacombe
generalized_nbody_acs_2015_challacombegeneralized_nbody_acs_2015_challacombe
generalized_nbody_acs_2015_challacombeMatt Challacombe
 
CLUSTERING IN DATA MINING.pdf
CLUSTERING IN DATA MINING.pdfCLUSTERING IN DATA MINING.pdf
CLUSTERING IN DATA MINING.pdfSowmyaJyothi3
 
Efficient Optimal Sizing And Allocation Of Capacitors In Radial Distribution ...
Efficient Optimal Sizing And Allocation Of Capacitors In Radial Distribution ...Efficient Optimal Sizing And Allocation Of Capacitors In Radial Distribution ...
Efficient Optimal Sizing And Allocation Of Capacitors In Radial Distribution ...IDES Editor
 
Multi-class Classification on Riemannian Manifolds for Video Surveillance
Multi-class Classification on Riemannian Manifolds for Video SurveillanceMulti-class Classification on Riemannian Manifolds for Video Surveillance
Multi-class Classification on Riemannian Manifolds for Video SurveillanceDiego Tosato
 
VLSI ARCHITECTURE OF AN 8-BIT MULTIPLIER USING VEDIC MATHEMATICS IN 180NM TEC...
VLSI ARCHITECTURE OF AN 8-BIT MULTIPLIER USING VEDIC MATHEMATICS IN 180NM TEC...VLSI ARCHITECTURE OF AN 8-BIT MULTIPLIER USING VEDIC MATHEMATICS IN 180NM TEC...
VLSI ARCHITECTURE OF AN 8-BIT MULTIPLIER USING VEDIC MATHEMATICS IN 180NM TEC...P singh
 
Types of clustering and different types of clustering algorithms
Types of clustering and different types of clustering algorithmsTypes of clustering and different types of clustering algorithms
Types of clustering and different types of clustering algorithmsPrashanth Guntal
 
C Programming : Arrays and Functions
C Programming : Arrays and FunctionsC Programming : Arrays and Functions
C Programming : Arrays and FunctionsSelvaraj Seerangan
 
PR-344: A Battle of Network Structures: An Empirical Study of CNN, Transforme...
PR-344: A Battle of Network Structures: An Empirical Study of CNN, Transforme...PR-344: A Battle of Network Structures: An Empirical Study of CNN, Transforme...
PR-344: A Battle of Network Structures: An Empirical Study of CNN, Transforme...Jinwon Lee
 
Array.....it also help full all ECE department students.
Array.....it also help full all ECE department students.Array.....it also help full all ECE department students.
Array.....it also help full all ECE department students.AnupamBiswas67
 
12000121037.pdf
12000121037.pdf12000121037.pdf
12000121037.pdfAVIWORLD1
 

Similar to Chapter 1 Solution Techniques.pdf (20)

DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
DSP IEEE paper
DSP IEEE paperDSP IEEE paper
DSP IEEE paper
 
09 placement
09 placement09 placement
09 placement
 
Cerebellar Model Articulation Controller
Cerebellar Model Articulation ControllerCerebellar Model Articulation Controller
Cerebellar Model Articulation Controller
 
Learning Theory 101 ...and Towards Learning the Flat Minima
Learning Theory 101 ...and Towards Learning the Flat MinimaLearning Theory 101 ...and Towards Learning the Flat Minima
Learning Theory 101 ...and Towards Learning the Flat Minima
 
A survey of indexing techniques for sparse matrices
A survey of indexing techniques for sparse matricesA survey of indexing techniques for sparse matrices
A survey of indexing techniques for sparse matrices
 
generalized_nbody_acs_2015_challacombe
generalized_nbody_acs_2015_challacombegeneralized_nbody_acs_2015_challacombe
generalized_nbody_acs_2015_challacombe
 
CLUSTERING IN DATA MINING.pdf
CLUSTERING IN DATA MINING.pdfCLUSTERING IN DATA MINING.pdf
CLUSTERING IN DATA MINING.pdf
 
Efficient Optimal Sizing And Allocation Of Capacitors In Radial Distribution ...
Efficient Optimal Sizing And Allocation Of Capacitors In Radial Distribution ...Efficient Optimal Sizing And Allocation Of Capacitors In Radial Distribution ...
Efficient Optimal Sizing And Allocation Of Capacitors In Radial Distribution ...
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
N41049093
N41049093N41049093
N41049093
 
Multi-class Classification on Riemannian Manifolds for Video Surveillance
Multi-class Classification on Riemannian Manifolds for Video SurveillanceMulti-class Classification on Riemannian Manifolds for Video Surveillance
Multi-class Classification on Riemannian Manifolds for Video Surveillance
 
VLSI ARCHITECTURE OF AN 8-BIT MULTIPLIER USING VEDIC MATHEMATICS IN 180NM TEC...
VLSI ARCHITECTURE OF AN 8-BIT MULTIPLIER USING VEDIC MATHEMATICS IN 180NM TEC...VLSI ARCHITECTURE OF AN 8-BIT MULTIPLIER USING VEDIC MATHEMATICS IN 180NM TEC...
VLSI ARCHITECTURE OF AN 8-BIT MULTIPLIER USING VEDIC MATHEMATICS IN 180NM TEC...
 
Types of clustering and different types of clustering algorithms
Types of clustering and different types of clustering algorithmsTypes of clustering and different types of clustering algorithms
Types of clustering and different types of clustering algorithms
 
C Programming : Arrays and Functions
C Programming : Arrays and FunctionsC Programming : Arrays and Functions
C Programming : Arrays and Functions
 
PR-344: A Battle of Network Structures: An Empirical Study of CNN, Transforme...
PR-344: A Battle of Network Structures: An Empirical Study of CNN, Transforme...PR-344: A Battle of Network Structures: An Empirical Study of CNN, Transforme...
PR-344: A Battle of Network Structures: An Empirical Study of CNN, Transforme...
 
Array.....it also help full all ECE department students.
Array.....it also help full all ECE department students.Array.....it also help full all ECE department students.
Array.....it also help full all ECE department students.
 
12000121037.pdf
12000121037.pdf12000121037.pdf
12000121037.pdf
 
EE5180_G-5.pptx
EE5180_G-5.pptxEE5180_G-5.pptx
EE5180_G-5.pptx
 

Recently uploaded

Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 

Recently uploaded (20)

Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 

Chapter 1 Solution Techniques.pdf

  • 1. 12/12/2022 1 ECEG 6011 Advanced Power System Analysis Chapter1: Solution Techniques Dr.M.Karthikeyan Dept. of Electrical and Computer Engineering Presented by Dr.M.Karthikeyan, AP/ECE, WSU 1
  • 2. 12/12/2022 2 SPARSE MATRIX • In numerical analysis and scientific computing, a sparse matrix or sparse array is a matrix in which most of the elements are zero. • A matrix is characterized as sparse, whenever a significant percentage of it's elements are equal to zero. The admittance or Y matrix of a power system is relatively sparse, whereas the Z of impedance matrix of the same system is proportionately full, i.e. very few zero elements. Presented by Dr.M.Karthikeyan, AP/ECE, WSU 2
  • 3. 12/12/2022 3 Why do use SPARSE MATRIX • Using sparse matrices to store data that contains a large number of zero-valued elements can both save a significant amount of memory and speed up the processing of that data. sparse is an attribute that you can assign to any two-dimensional MATLAB® matrix that is composed of double or logical elements. Presented by Dr.M.Karthikeyan, AP/ECE, WSU 3
  • 4. 12/12/2022 4 Y-bus is a sparse matrix • The Y-bus is a sparse matrix. For a large power system, more than 90% of off-diagonal elements are zero. This is due to the fact that in power system networks each node (bus) is connected to not more than three nodes. Presented by Dr.M.Karthikeyan, AP/ECE, WSU 4
  • 5. 12/12/2022 5 TYPES OF SPARSE MATRIX • csc_matrix: Compressed Sparse Column format. • csr_matrix: Compressed Sparse Row format. • bsr_matrix: Block Sparse Row format. • lil_matrix: List of Lists format. • dok_matrix: Dictionary of Keys format. • coo_matrix: COOrdinate format (aka IJV, triplet format) Presented by Dr.M.Karthikeyan, AP/ECE, WSU 5
  • 6. 12/12/2022 6 SPARSE MATRIX IN DATA STRUCTURE • Sparse matrix is a matrix which contains very few non-zero elements. When a sparse matrix is represented with a 2- dimensional array, we waste a lot of space to represent that matrix. For example, consider a matrix of size 100 X 100 containing only 10 non-zero elements. Presented by Dr.M.Karthikeyan, AP/ECE, WSU 6
  • 7. 12/12/2022 7 ADVANTAGES OF SPARSE MATRIX The advantages of sparse matrices are size and speed. A 5000 by 5000 matrix in full storage requires space for 25 million complex numbers even if only 50,000 are nonzero. The same 50,000- nonzero element matrix, in sparse storage, would store 50,000 complex numbers and 50,000 pairs of integer indices. Presented by Dr.M.Karthikeyan, AP/ECE, WSU 7
  • 8. 12/12/2022 8 REPRESENTATION OF SPARSE MATRIX • Two methods of representation: • 1. Array Representation • 2. Linked Lists Representation Presented by Dr.M.Karthikeyan, AP/ECE, WSU 8
  • 9. 12/12/2022 9 Sparse Matrix Techniques for Large Scale Power System Linear System Solution – Introduction • A problem that occurs in many is fields is the solution of linear systems Ax = b where A is an n by n matrix with elements aij, and x and b are n-vectors with elements xi and bi respectively • In power systems we are particularly interested in systems when n is relatively large and A is sparse • How large is changing • A matrix is sparse if a large percentage of its elements have zero values • Goal is to understand the computational issues (including complexity) associated with the solution of these systems Presented by Dr.M.Karthikeyan, AP/ECE, WSU 9
  • 10. 12/12/2022 10 Linear system – contd., • Sparse matrices arise in many areas, and can have domain specific structures • Symmetric matrices • Structurally symmetric matrices • Tridiagnonal matrices • Banded matrices Presented by Dr.M.Karthikeyan, AP/ECE, WSU 10
  • 11. 12/12/2022 11 Symmetric Matrix • A symmetric matrix in linear algebra is a square matrix that remains unaltered when its transpose is calculated. • That means, a matrix whose transpose is equal to the matrix itself, is called a symmetric matrix. Presented by Dr.M.Karthikeyan, AP/ECE, WSU 11
  • 12. 12/12/2022 12 Structurally Symmetric Matrix • A structurally symmetric sparse matrix has nonzero values with the property that if a(i, j) 0, then a(j, i) 0 for all i and j. • When solving a structurally symmetric system, the entire matrix must be passed to the solver routines. Presented by Dr.M.Karthikeyan, AP/ECE, WSU 12
  • 13. 12/12/2022 13 Tridiagonal Matrix • A tridiagonal matrix is a matrix that has non-zero elements only at the main diagonal, diagonal below and above it. • All other elements are zero. • For this reason tridiagonal matrices of dimension smaller than or equal to 3 seem meaningless. Presented by Dr.M.Karthikeyan, AP/ECE, WSU 13
  • 14. 12/12/2022 14 Banded Matrix • A banded matrix is a matrix whose only nonzero elements lie on diagonal bands above and/or below the main diagonal. • The number of nonzero diagonals above the main diagonal is called the upper bandwidth. • The number of nonzero diagonals below the main diagonal is called the lower bandwidth. Presented by Dr.M.Karthikeyan, AP/ECE, WSU 14
  • 15. 12/12/2022 15 Sparse Systems • The material presented so far applies to any arbitrary linear system • The next step is to see what happens when we apply triangular factorization to a sparse matrix • For a sparse system, only nonzero elements need to be stored in the computer since no arithmetic operations are performed on the 0’s. • The triangularization scheme is adapted to solve sparse systems in such a way as to preserve the sparsity as much as possible Presented by Dr.M.Karthikeyan, AP/ECE, WSU 15
  • 16. 12/12/2022 16 Inverse of a Sparse Matrix • The inverse of a sparse matrix is NOT in general a sparse matrix • We never (or at least very, very, very seldom) explicitly invert a sparse matrix • Individual columns of the inverse of a sparse matrix can be obtained by solving x = A-1b with b set to all zeros except for a single nonzero in the position of the desired column • If a few desired elements of A-1 are desired (such as the diagonal values) they can usually be computed quite efficiently using sparse vector methods (a topic we’ll be considering soon) • We can’t invert a singular matrix (with sparse or not) 16 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 17. 12/12/2022 17 Computer Architecture Impacts • With modern computers the processor speed is many times faster than the time it takes to access data in main memory • Some instructions can be processed in parallel • Caches are used to provide quicker access to more commonly used data • Caches are smaller than main memory • Different cache levels are used with the quicker caches, like L1, have faster speeds but smaller sizes; L1 might be 64K, whereas the slower L2 might be 1M • Data structures can have a significant impact on sparse matrix computation 17 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 18. 12/12/2022 18 Full Matrix versus Sparse Matrix Storage • Full matrices are easily stored in arrays with just one variable needed to store each value since the value’s row and column are implicitly available from its matrix position • With sparse matrices two or three elements are needed to store each value • The zero values are not explicitly stored • The value itself, its row number and its column number • Storage can be reduced by storing all the elements in a particular row or column together • Because large matrices are often quite sparse, the total storage is still substantially reduced 18 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 19. 12/12/2022 19 Sparse Matrix Usage Can Determine the Optimal Storage • How a sparse matrix is used can determine the best storage scheme to use • Row versus column access; does structure change • Is the matrix essentially used only once? That is, its structure and values are assumed new each time used • Is the matrix structure constant, with its values changed • This would be common in the N-R power flow, in which the structure doesn’t change each iteration, but its values do • Is the matrix structure and values constant, with just the b vector in Ax=b changing • Quite common in transient stability solutions 19 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 20. 12/12/2022 20 General Sparse Matrix Storage • A general approach for storing a sparse matrix would be using three vectors, each dimensioned to number of elements • AA: Stores the values, usually in power system analysis as double precision values (8 bytes) • JR: Stores the row number; for power problems usually as an integer (4 bytes) • JC: Stores the column number, again as an integer • If unsorted then both row and column are needed • New elements could easily be added, but costly to delete • Unordered approach doesn’t make for good computation since elements used next computationally aren’t necessarily nearby • Usually ordered, either by row or column 20 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 21. 12/12/2022 21 Sparse Storage Example • Assume • Then 21 5 0 0 4 0 4 0 3 0 0 3 2 4 3 2 10                    A       5 4 4 3 3 2 4 3 2 10 1 1 2 2 3 3 4 4 4 4 1 4 2 4 3 4 1 2 3 4          AA JR JC Note, this example is a symmetric matrix, but the technique is general Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 22. 12/12/2022 22 Compressed Sparse Row Storage • If elements are ordered (as was case for previous example) storage can be further reduced by noting we do not need to continually store each row number • A common method for storing sparse matrices is known as the Compressed Sparse Row (CSR) format • Values are stored row by row • Has three vector arrays: • AA: Stores the values as before • JA: Stores the column index (done by JC in previous example) • IA: Stores the pointer to the index of the beginning of each row 22 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 23. 12/12/2022 23 CSR Format Example • Assume as before • Then 23 5 0 0 4 0 4 0 3 0 0 3 2 4 3 2 10                    A       5 4 4 3 3 2 4 3 2 10 1 4 2 4 3 4 1 2 3 4 1 3 5 7          AA JA IA Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 24. 12/12/2022 24 CSR Comments • The CSR format reduces the storage requirements by taking advantage of needing only one element per row • The CSR format has good advantages for computation when using cache since (as we shall see) during matrix operations we are often sequentially going through the vectors • An alternative approach is Compressed Sparse Column (CSC), which identical, except storing the values by column • It is difficult to add values. • We’ll mostly use the linked list approach here, which makes matrix manipulation simpler 24 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 25. 12/12/2022 25 Linked Lists: Classes and Objects • In explaining the linked list approach it is helpful to use the concepts from object oriented programming (OOP) of classes and objects • Approach can also be used in non-OOP programming • OOP can be thought of as a collection of objects interacting with each other • Objects are instances of classes. • Classes define the object fields and actions (methods) • We’ll define a class called sparse matrix element, with fields of value, column and next; each sparse matrix element is then an object of this class 25 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 26. 12/12/2022 26 Linked Lists • A linked list is just a group of objects that represent a sequence • We’ll used linked lists to represent a row or column of a sparse matrix • Each linked list has a head pointer that points to the first object in the list • For our sparse matrices the head pointer will be a vector of the rows or columns 26 Column a Value a Next a Column b Value b Next b Column c Value c Nil Head Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 27. 12/12/2022 27 Sparse Matrix Storage with Linked Lists by Rows • If we have an n by n matrix, setup a class called T sparse Element with fields column, value and next • Setup an n-dimensional head pointer vector that points to the first element in each row • Each nonzero corresponds to an object of class (type) T Sparse Element • We do not need to store the row number since it is given by the object’s row • For power system sparse matrices, which have nonzero diagonals, we also have a header pointer vector that points to the diagonal objects 27 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 28. 12/12/2022 28 Fills • When doing a factorization of a sparse matrix some values that were originally zero can become nonzero during the factorization process • These new values are called “fills” (some call them fill-ins) • For a structurally symmetric matrix the fill occurs for both the element and its transpose value (i.e., Aij and Aji) • How many fills are required depends on how the matrix is ordered • For a power system case this depends on the bus ordering 28 Presented by Dr.M.Karthikeyan, AP/ECE, WSU 28
  • 29. 12/12/2022 29 Fills • There are two key issues associated with fills • Adding the fills • Ordering the matrix elements (buses in our case) to reduce the number of fills • The amount of computation required to factor a sparse matrix depends upon the number of non-zeros in the original matrix, and the number of fills added • How the matrix is ordered can have a dramatic impact on the number of fills, and hence the required computation • Usually a matrix cannot be ordered to totally eliminate fills 29 Presented by Dr.M.Karthikeyan, AP/ECE, WSU 29
  • 30. 12/12/2022 30 Fill Examples 4 1 2 3 1 2 3 4 5 0 0 4 0 4 0 3 0 0 3 2 4 3 2 10                    A 10 4 3 2 4 5 0 0 3 0 4 0 2 0 0 3                    B No Fills Required Fills Required (matrix becomes full) 30 Presented by Dr.M.Karthikeyan, AP/ECE, WSU 30
  • 31. 12/12/2022 31 Example: 7 by 7 Matrix • Consider the 7 x 7 matrix A with the zero-nonzero pattern shown in (a): of the 49 possible elements there are only 31 that are nonzero • If elimination proceeds with the given ordering, all but two of the 18 originally zero entries, will fill in, as seen in (b) 31 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 32. 12/12/2022 32 1 2 3 4 5 6 7 1 X X X X X X 2 X X X X X 3 X X X X X 4 X X X 5 X X X X 6 X X X X X 7 X X X (a) the original zero- nonzero structure 1 2 3 4 5 6 7 1 X X X X X X 2 X X X F F X X 3 X X X F F X X 4 X F F X X F F 5 X F F X X X F 6 X X X F X X F 7 X X F F F X (b) the post- elimination zero-nonzero pattern r c r c 32 Example: 7 by 7 Matrix Structure Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 33. 12/12/2022 33 • We next reorder the rows and the columns of A so as to result in the pattern shown in (c) • For this reordering, we obtain no fills, as shown in the table of factors given in (d ) • In this way, we preserve the original sparsity of A 33 Example: 7 by 7 Matrix Reordering Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 34. 12/12/2022 34 4 5 1 6 7 3 2 4 X X X 5 X X X X 1 X X X X X X 6 X X X X X 7 X X X 3 X X X X X 2 X X X X X (c) the reordered system 4 5 1 6 7 3 2 4 X X X 5 X X X X 1 X X X X X X 6 X X X X X 7 X X X 3 X X X X X 2 X X X X X (d) the post- elimination reordered system r c r c 34 Example: 7 by 7 Matrix Reordered Structure Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 35. 12/12/2022 35 • For structurally symmetric matrices we can gain good insights into the problem by examining the graph- theoretic interpretation of the triangularization process • This assumption involves essentially no loss in generality since if Aij  0 but Aji = 0 we simply treat Aji as a nonzero element with the value 0; in this way, we ensure that A has a symmetric structure • We term a matrix as structurally symmetric whenever it has a symmetric zero-nonzero pattern Fills for Structurally Symmetric Matrices 35 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 36. 12/12/2022 36 • We make use of graph theoretic notions to develop a practical reordering scheme for sparse systems • We associate a graph G with the zero-nonzero structure of the n by n matrix A • We construct the graph G associated with the matrix A as follows: i. G has n nodes corresponding to the dimension n of the square matrix: node i represents both the column i and the row i of A; ii. a branch (k, j) connecting nodes k and j exists if and only if the element Ajk (and, by structural symmetry, Akj) is nonzero; the self loop corresponding to Akk is not represented 36 Graph Associated with A Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 37. 12/12/2022 37 • We consider the simple linear resistive network with the topology shown below  1 s  2 s  4 s  3 s 37 Example: Linear Resistive Network Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 38. 12/12/2022 38 • The corresponding loop impedance matrix has the following zero - nonzero pattern: 1 2 3 4 1 X X 0 X 2 X X X 0 3 0 X X X 4 X 0 X X r c 38 Example: Linear Resistive Network Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 39. 12/12/2022 39 • The associated 4-node graph of the matrix is • We next illustrate the graphical interpretation of the elimination process with another example 1 2 3 4 39 Example: Linear Resistive Network Presented by Dr.M.Karthikeyan, AP/ECE, WSU 39
  • 40. 12/12/2022 40 Example: 5 by 5 System • Suppose that A has the zero-nonzero pattern 1 2 3 4 5 1 X X X X 2 X X X 3 X X X 4 X X X X 5 X X X r c 40 Presented by Dr.M.Karthikeyan, AP/ECE, WSU 40
  • 41. 12/12/2022 41 Example: 5 by 5 System • Then, the associated graph G is 1 2 3 4 5 41 Presented by Dr.M.Karthikeyan, AP/ECE, WSU 41
  • 42. 12/12/2022 42 • The graph-theoretic interpretation of the elimination of the node (bus) j is as follows • The deletion of the node j involves all its incident branches (k, j) and ( j, k) connected to j, kj • In the pre-elimination graph of the eliminated node j, the elimination of the branches ( j, k) and (l, j) results in the addition of the new branch (k, l), if one does not already exist Graph-Theoretic Interpretation 42 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 43. 12/12/2022 43 • We eliminate the Bus (Node) 1 variable with the resulting zero-nonzero pattern as shown the array bordered by the broken lines with on the new graph new G1 1 2 3 4 5 1 X X X X 2 X X X F F 3 X X X 4 X F X X X 5 X F X X r c 43 Example: 5 by 5 System Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 44. 12/12/2022 44 Graph G1 • We obtain the graph G1 from G by removing Bus 1 with the new added branches (2, 4) and (2, 5) corresponding to the fills 5 2 4 3 new branch 44 Example: 5 by 5 System Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 45. 12/12/2022 45 • The elimination of Bus 2 results in the submatrix shown below 3 4 5 3 X X F 4 X X X 5 F X X r c 45 Example: 5 by 5 System Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 46. 12/12/2022 46 with the corresponding graph G2 • The elimination of Bus 3 yields 5 4 3 4 5 4 X X 5 X X r c 46 Example: 5 by 5 System Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 47. 12/12/2022 47 with the corresponding graph G3 • Finally, upon Bus 4 we have • and the corresponding G4 is simply the point 5 5 X 5 4 5 r c 47 Example: 5 by 5 System Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 48. 12/12/2022 48 • We next examine how we may reorder the rows and columns of A to preserve its sparsity, i.e., to minimize the number of fills • Eventually we’ll introduce an algorithm to try to minimize the fills • This is motivated by revisiting the graph G 1 2 3 4 5 Reording the Rows/Columns 48 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 49. 12/12/2022 49 • To minimize the number of fills, i.e., the number of new branches in G, we eliminate first the node which upon deletion introduces the least number of new branches • This is node 5 and upon deletion no new branches are added and the resulting graph G1 is 1 4 2 3 49 Reording Motivating Example Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 50. 12/12/2022 50 • The structure of G1 is such that any one of the remaining nodes may be chosen as the next node to be eliminated since each of the 4 remaining nodes introduces a new branch after its elimination • We arbitrarily pick node 1 and we obtain the graph G2 • We continue with the next three choices arbitrary, resulting in no new fills 2 3 4 new branch 50 Reordering Motivating Example Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 51. 12/12/2022 51 • We may relabel the original graph in such a way that the label of the node refers to the order in which it is eliminated • Thus we renumber the nodes as shown below 1 2 3 4 5 51 Reordering Motivating Example Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 52. 12/12/2022 52 • Clearly, relabeling the nodes corresponds to reordering the rows and columns of A • For the reordered system, the zero-nonzero pattern of A is 1 2 3 4 5 1 X X X 2 X X X X 3 X X X 4 X X X 5 X X X X r c 52 Reordering Motivating Example Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 53. 12/12/2022 53 and of its table of factors has the zero-nonzero structure Compared to the original ordering scheme, the new ordering scheme has saved us 4 fill-ins 1 2 3 4 5 1 X X X 2 X X X X 3 X X X F 4 X X X 5 X X F X X r c 53 Reordering Motivating Example Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 54. 12/12/2022 54 • The associated graph of the structurally symmetric matrix A is useful in gaining insights into the factorization process • We make the following observations • If A is originally structurally symmetric, then it remains so in all the steps of the factorization; • A good ordering scheme is independent of the values of the elements of A and depends only on its the zero-nonzero pattern 54 General Findings Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 55. 12/12/2022 55 Sparse Vector Methods • Sparse vector methods are useful for cases in solving Ax=b in which • A is sparse • b is sparse • only certain elements of x are needed • In these right circumstances sparse vector methods can result in extremely fast solutions! • A common example is to find selected elements of the inverse of A, such as diagonal elements. 55 Presented by Dr.M.Karthikeyan, AP/ECE, WSU 55
  • 56. 12/12/2022 56 Sparse Vector Methods Introduced • Assume we are solving Ax = b with A factored so we solve LUx = b by first doing the forward substitution to solve Ly = b and then the backward substitution to solve Ux = y • A key insight: In the solution of Ly = b if b is sparse then only certain columns of L are required, and y is often sparse y1 . . . yn . . . x . . . x . . . x = 56 Presented by Dr.M.Karthikeyan, AP/ECE, WSU 56
  • 57. 12/12/2022 57 Fast Forward Substitution • If b is sparse, then the fast forward (FF) substitution takes advantage of the fact that we only need certain columns of L • We define {FF} as the set of columns of L needed for the solution of Ly = b; this is equal to the nonzero elements of y • In general the solution of Ux = y will NOT result in x being a sparse vector • However, oftentimes only certain elements of x are desired • E.g., the sensitivity of the flows on certain lines to a change in generation at a single bus; or a diagonal of A-1 57 Presented by Dr.M.Karthikeyan, AP/ECE, WSU 57
  • 58. 12/12/2022 58 Fast Backward Substitution • In the case in which only certain elements of x are desired, then we only need to use certain rows in U below the desired elements of x; define these columns as {FB} • This is known as a fast backward substitution (FB), which is used to replace the standard backward substitution . . . x . . . x . . . x . . y1 y2 . . . yn = 58 Presented by Dr.M.Karthikeyan, AP/ECE, WSU 58
  • 59. 12/12/2022 59 Factorization Paths • We observe that • {FF} depends on the sparsity structures of L and b • {FB} depends on the sparsity structures of U and x • The idea of the factorization path provides a systematic way to construct these sets • A factorization path is an ordered set of nodes associated with the structure of the matrix • For FF the factorization path provides an ordered list of the columns of L • For FB the factorization path provides an ordered list of the rows of U 59 Presented by Dr.M.Karthikeyan, AP/ECE, WSU 59
  • 60. 12/12/2022 60 Gaussian Elimination • The best known and most widely used method for solving linear systems of algebraic equations is attributed to Gauss • Gaussian elimination avoids having to explicitly determine the inverse of A, which is O(n3) • Gaussian elimination can be readily applied to sparse matrices • Gaussian elimination leverages the fact that scaling a linear equation does not change its solution, nor does adding on linear equation to another 1 2 1 2 2 4 10 2 5 x x x x      60 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 61. 12/12/2022 61 Gaussian Elimination, cont. • Gaussian elimination is the elementary procedure in which we use the first equation to eliminate the first variable from the last n-1 equations, then we use the new second equation to eliminate the second variable from the last n-2 equations, and so on • After performing n-1 such eliminations we end up with a triangular system which is easily solved in a backward direction 61 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 62. 12/12/2022 62 Example 1 • Solve the equations using Gauss Elimination Method. 3x1 + 12x3 = 15 3 0 12 x1 = 15 6x2 + 12x3 = 15 0 6 12 x2 15 3x1 + 10x2 + 16x3 = 24 or 3 10 16 x3 24 Presented by Dr.M.Karthikeyan, AP/ECE, WSU 62
  • 63. 12/12/2022 63 Triangular Decomposition • In this example, we have: • triangularized the original matrix by Gaussian elimination using column elimination • then, we used back substitution to solve the triangularized system • The following slides present a general scheme for triangular decomposition by Gaussian elimination • The assumption is that A is a nonsingular matrix (hence its inverse exists) • Gaussian elimination also requires the diagonals to be nonzero; this can be achieved through ordering • If b is zero then we have a trivial solution x = 0 63 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 64. 12/12/2022 64 Triangular Decomposition • We form the matrix Aa using A and b with and show the steps of the triangularization scheme                           11 12 1 1 21 22 2 2 31 32 3 3 1 2          n n n n n nn n a a a b a a a b a a a b a a a b                   a   A A b  64 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 65. 12/12/2022 65 Triangular Decomposition, Step 1 • Step 1: normalize the first equation  1 (1) 1 11 1 (1) 1 11 = 2 ... = j j a a j , ,n a b b a 65 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 66. 12/12/2022 66 Triangular Decomposition, Step 2 • Step 2: a) eliminate x1 from row 2: • Step 2: b) normalize the second equation 66 ,  (1) (1) 2 2 21 1 2 ... j j j a = a a a j = , ,n  (1) (1) 2 2 21 1 b = b a b , (1) 2 (2) 2 (1) 22 3 ... j j a a = j = , ,n a (1) 2 (2) 2 (1) 22 b b = a Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 67. 12/12/2022 67 Triangular Decomposition, Step 2 and we end up at the end of step 2 with                         (1 ) (1 ) (1 ) (1 ) 1 2 1 3 1 1 (2 ) (2 ) (2 ) 2 3 2 2 3 1 3 2 3 3 3 3 1 2 3 1 1           n n n n n n n n n a a a b 0 a a b a a a a b a a a a b 67 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 68. 12/12/2022 68 Triangular Decomposition, Step 3 • Step 3: a) eliminate x1 and x2 from row 3: • Step 3: b) normalize the third equation: 2   ( ) (1) (1) (2) 3 3 32 2 3 ... j j j a a a a j = , ,n  (1) (1) 3 3 31 1 2 j j j a = a a a j = , ... ,n  (1) (1) 3 3 31 1 b = b a b  (2) (1) (1) (2) 3 3 32 2 b = b a b (2) 3 (3) 3 (2) 33 4 ... j j a a = j = , ,n a (2) 3 (3) 3 (2) 33 b b = a 68 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 69. 12/12/2022 69 Triangular Decomposition, Step 3 and we have the system at the end of step 3                       (1) (1) (1) (1) (1) 12 13 14 1 1 (2) (2) (2) (2) 21 24 2 2 (3) (3) (3) 34 3 3 41 42 43 44 4 4 1 2 3 4 1 1 1             n n n n n n n n nn n a a a a b 0 a a a b 0 0 a a b a a a a a b a a a a a b 69
  • 70. 12/12/2022 70 Triangular Decomposition, Step k • In general, we have for step k: a) eliminate from row k: b) normalize the kth equation:    1 1 1 ... (m) (m ) (m ) (m) kj kj km mj a = a a a j = m + , ,n , , , 1 2 1 ... k x x x     1 1 1 2 ... 1 (m) (m ) (m ) (m) k k km m b = b a b m = , , , k -   1 1 = = 1 ... (k ) kj (k) kj (k ) kk j a a k + , ,n a   1 1 = (k ) k (k) k (k ) kk b b a 70 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 71. 12/12/2022 71 Triangular Decomposition: Upper Triangular Matrix • and proceed in this manner until we obtain the upper triangular matrix (the nth derived system):                       (1) (1) (1) (1) (1) 12 13 14 1n 1 (2) (2) (2) (2) 21 24 2 2 (3) (3) (3) 34 3 3 (4) (4) 4 4 1 1 1 1 1             n n n (n) n a a a a b 0 a a a b 0 0 a a b 0 0 0 a b 0 0 0 0 b 71 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 72. 12/12/2022 72 Triangular Decomposition • Note that in the scheme presented, unlike in the first example, we triangularly decompose the system by eliminating row-wise rather than column-wise • In successive rows we eliminate (reduce to 0) each element to the left of the diagonal rather than those below the diagonal • Either could be used, but row-wise operations will work better for power system sparse matrices 72 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 73. 12/12/2022 73 Example 2 • Solve for x in the system using OTF • The three elimination steps are given on the next slides; for simplicity, we have appended the r.h.s. vector to the matrix • First step is set the diagonal element of row 1 to 1 (i.e., normalize it) 1 2 3 4 2 3 1 0 20 6 5 0 2 45 2 5 6 6 3 4 2 2 3 30 x x x x                                              73 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 74. 12/12/2022 74 Example 2, cont. • Eliminate x1 by subtracting row 1 from all the rows below it 1 1 2 multiply row by  1 2 3 multiply row by and add to row  1 4 4 multiply row by and add to row 1 6 2 multiply row by and add to row 74 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 75. 12/12/2022 75 Example 2, cont. • Eliminate x2 by subtracting row 2 from all the rows below it 1 2 4 multiply row by 2 8 3 multiply row by and add to row 2 4 4 multiply row by and add to row                       3 1 1 0 10 2 2 0 1 0 0 1 2 7 0 0 1 1 5 3 1 15 4 2 4 75 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 76. 12/12/2022 76 Example 2, cont. • Elimination of x3 from row 3 and 4 3 4 subtract row fromrow                       3 1 1 0 10 2 2 0 1 0 0 1 2 7 0 0 0 1 2 3 1 15 4 2 4 76 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 77. 12/12/2022 77 Example 2, cont. • Then, we solve for x by “going backwards”, i.e., using back substitution:      2 3 4 2 3 1 15 7 4 2 4 x x x x   4 2 x     3 4 3 2 7 3 x x x      1 2 3 1 3 1 10 1 2 2 x x x x 77 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 78. 12/12/2022 78 Solving for X • To compute x we perform back substitution                1 1 1 1 1 1 = = = 1 2 ... 1  n n n- n- n- ,n n n k k k k k j j j=k+ x b a x x b a x k n , n , ,    n n n x b 78 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 79. 12/12/2022 79 Upper Triangular Matrix • The triangular decomposition scheme applied to the matrix A results in the upper triangular matrix U with the elements • The following theorem is important in the development of the sparse computational scheme        1 = (i) ij ij i j u = a j > i 0 j < i 79 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 80. 12/12/2022 80 LU Decomposition Theorem • Any nonsingular matrix A has the following factorization: where U could be the upper triangular matrix previously developed (with 1’s on its diagonals) and L is a lower triangular matrix defined by A = LU       1 = (j ) i j ij a 0  j i  j i  80 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 81. 12/12/2022 81 LU Decomposition Application • As a result of this theorem we can rewrite • Can also be set so U has non unity diagonals • Once A has been factored, we can solve for x by first solving for y, a process known as forward substitution, then solving for x in a process known as back substitution • In the previous example we can think of L as a record of the forward operations preformed on b. Define Then Ax = LUx = b y = Ux Ly = b 81 Presented by Dr.M.Karthikeyan, AP/ECE, WSU
  • 82. 12/12/2022 82 • A =LU Where L = 1 0 0 U = U11 U12 U13 L21 1 0 0 U22 U23 L31 L32 1 0 0 U33 LU = U11 U12 U13 L21U11 L21U12+U22 L21U13+U23 L31U11 L31U12+L32U22 L31U13+L32U23+U33 Presented by Dr.M.Karthikeyan, AP/ECE, WSU 82 LU Decomposition Application
  • 83. 12/12/2022 83 Symmetric Matrix Factorization • There are also some computational benefits from factoring symmetric matrices. However, since symmetric matrices are not common in power applications, we will not consider them in-depth • However, topologically symmetric sparse matrices are quite common, so those will be our main focus 83 Presented by Dr.M.Karthikeyan, AP/ECE, WSU