tailieunhanh - Lecture Methods of Electric power systems analysis - Lesson 8: Sparse systems

Lecture Methods of Electric power systems analysis - Lesson 8: Sparse systems provide students with knowledge about general sparse matrix storage; a general approach for storing a sparse matrix would be using three vectors, each dimensioned to number of elements; unordered approach doesn’t make for good computation since elements used next computationally aren’t necessarily nearby; . | ECEN 615 Methods of Electric Power Systems Analysis Lecture 8 Sparse Systems Prof. Tom Overbye Dept. of Electrical and Computer Engineering Texas A amp M University overbye@ Announcements Homework 2 is due on Thursday September 17 Optionally you can setup your code to ignore the resistance terms this eliminates the G elements from the bus admittance matrix For homework 2 you ll need to commercial version of PowerWorld Simulator. 1 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 2 Sparse Storage Example Assume 5 0 0 4 0 4 0 3 A 0 0 3 2 4 3 2 10 AA 5 4 4 3 3 2 4 3 2 10 Then JR 1 1 2 2 3 3 4 4 4 4 JC 1 4 2 4 3 4 1 2 3 4 Note this example is a symmetric matrix but the technique is general 3 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 4 CSR Format Example Assume as before 5 0 0 4 0 4 0 3 A 0 0 3 2 4 3 2 10 Then AA 5 4 4 3 3 2 4 3 2 10 JA 1 4 2 4 3 4 1 2 3 4 IA 1 3 5 7 5 CSR Comments The CSR format reduces the storage requirements by taking advantage of needing only one .

TỪ KHÓA LIÊN QUAN