Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Preprocessing tools for transient simulation programs at UBC Dai, Nan 1999

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
831-ubc_1999-0489.pdf [ 11.98MB ]
Metadata
JSON: 831-1.0064818.json
JSON-LD: 831-1.0064818-ld.json
RDF/XML (Pretty): 831-1.0064818-rdf.xml
RDF/JSON: 831-1.0064818-rdf.json
Turtle: 831-1.0064818-turtle.txt
N-Triples: 831-1.0064818-rdf-ntriples.txt
Original Record: 831-1.0064818-source.json
Full Text
831-1.0064818-fulltext.txt
Citation
831-1.0064818.ris

Full Text

PREPROCESSING TOOLS FOR TRANSIENT SIMULATION PROGRAMS AT UBC by Nan Dai B.A.Sc, Electrical Engineering, Huazhong Univ. of Science & Technology, 1991 M.A.Sc, Computer Application, Wuhan Univ. of Hydraulic & Electric Eng., 1996 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF APPLIED SCIENCE in THE FACULTY OF GRADUATE STUDIES DEPARTMENT OF ELECTRICAL ENGINEERING We accept this thesis as conforming to the required standard THE UNIVERSITY OF BRITISH COLUMBIA October 1999 © Nan Dai, 1999 In presenting this thesis in partial fulfilment of the requirements for an advanced degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. It is understood that copying or publication of this thesis for financial gain shall not be allowed without my written permission. Department of P^snCkl Aitil f/miwtitf MtibilH The University of British Columbia Vancouver, Canada Da.e (bl.. Ii- , Hfl DE-6 (2/88) ABSTRACT This thesis presents three improvements on UBC's transients simulation programs. The first two are in connection with the existing off-line simulator MicroTran, while the last one is in connection with the newest frequency-dependent Z - Line model. MicroTran is a very powerful tool for power system transient analysis as well as steady-state analysis. It has been applied successfully for many years. However, it still needs improvements to extend its application. One improvement is related to statistical data analysis. This type of analysis is very helpful for applications such as insulation system design. In Chapter 1, an example of statistical analysis of switching surges during circuit breaker energization is used to implement the whole procedure of statistical analysis totally by software. Another improvement is related to the data input interface. The original data entry module mtData requires very strictly defined data formats and pre-calculations have to be made for some special components. This is inconvenient for those who are not familiar with these components or are not advanced computer users. In Chapter 2 the user interface for a graphical version (GUI) of data input cards is introduced and the data filter program being responsible for transferring data to the requirement format internally is explained. The newest frequency-dependent Z - Line model was recently developed by Dr. Castellanos and is based on space discretization. It separates the characteristics of the wave equation into two parts: constant ideal wave propagation and frequency-dependent wave distortion. For a practical implementation of the Z - Line model two questions needed to be solved. One was the development of a general fitting procedure to help the user obtain in an automatic ii manner the full frequency-dependent line impedance representation [ Z (&>)]. The other aspect was to find a general relationship between the maximum section length and the highest frequency of interest in transient studies so that the program can automatically determine how many sections are needed for the specified accuracy of the simulation. In Chapter 3 the solutions to these two critical problems are explained in detail. iii T A B L E OF CONTENTS ABSTRACT ii TABLE OF CONTENTS iv LIST OF TABLES vii LIST OF FIGURES viii ACKNOWLEDGMENTS x CHAPTER 1 STATISTICAL ANALYSIS OF SWITCHING SURGES DURING ENERGIZATION 1 1.1 INTRODUCTION 1 1.2 SOME STATISTICAL CONCEPTS 2 1.3 CASE INTRODUCTION 5 1.4 P R O G R A M IMPLEMENTATION 9 1.5 A N A L Y S I S OF THE RESULTS 12 1.6 CONCLUSION 15 CHAPTER 2 18 IV GUI FOR DATA INPUT AND VALIDATION IN MICROTRAN 18 2.1 INTRODUCTION 18 2.2 G R A P H I C A L USER INTERFACE (GUI) DESIGN... . 19 2.2.1 Panel Introduction 19 2.2.2 Data Validation Engine 26 2.2.3 Popup Windows 29 2.3 D A T A FILTER IMPLEMENTATION 31 2.4 D A T A MODIFICATION A N D SIMULATION 34 2.5 S U M M A R Y .-. 35 CHAPTER 3 37 AUTOMATIC SECTION LENGTH SELECTION FOR THE Z - LINE MODEL 37 3.1 REVIEW OF TRANSMISSION LINE MODELS 37 3.2 THE Z - LINE M O D E L 38 3.3 P A R A M E T E R FITTING PROCEDURE 41 3.3.1 Line Constants Program 42 3.3.2 GUI Design 45 3.4 N U M B E R OF SECTIONS PER LINE L E N G T H 51 3.4.1 Reason for Line Sectionalization 51 3.4.2 Method of Analysis 52 3.4.3 Preparation for A Relationship Determination.. 55 3.4.4 Implementation Procedure 63 v 3.4.4 Maximum Section Length Results 67 3.4.5 Cascade Effect Analysis 69 3.5 CONCLUSION 70 CHAPTER 4 72 FUTURE WORK 72 CHAPTER 5 74 CONCLUSIONS 74 BIBLIOGRAPHY 75 APPENDIX 1 THE FITTING PROCEDURE IMPLEMENTATION 77 v i LIST OF T A B L E S Table 1.1 List of Input Data File 7 Table 1.2 Statistical Analysis of Phase Voltages (1) 13 Table 1.3 Percentage (1) 1 4 Table 1.4 Statistical Analysis of Phase Voltages (2) 14 Table 1.5 Percentage (2) 14 Table 3.1 Maximum Section Length (km) (for 5% error) 68 . Table 3.2 Average Relative Error after Cascaded Connection 70 v i i LIST OF FIGURES Fig. 1.1 Standard Normal Distribution 4 Fig. 1.2 Network Configuration 5 Fig. 1.3 Voltages on Phase A 8 Fig. 1.4 Voltages on Phase B 8 Fig. 1.5 Voltages on Phase C 9 Fig. 2.1 GUI of Main Panel 20 Fig. 2.2 GUI of Piecewise Linear Resistance 22 Fig. 2.3 GUI of Pi-Circuits : 23 Fig. 2.4 GUI of Balanced Lines 24 Fig. 2.5 GUI of Unbalanced Lines 24 Fig. 2.6 GUI of Time-Controlled Switches 25 Fig. 2.7 GUI of Piecewise Linear Composite Function of Source 26 Fig. 2.8 GUI of Data Validation for Positive Sequence Mode Parameters 27 Fig. 2.9 GUI of Data Validation for Zero Sequence Mode Parameters 28 Fig. 3.1 Separation of Basic Effects in the Z - Line Model 39 Fig. 3.2 GUI for Parameter Fitting Procedure - Case 1 48 Fig. 3.3 GUI for Fitting Data Comparison - Case 1 49 Fig. 3.4 GUI for Parameter Fitting Procedure - Case 2 49 Fig. 3.5 GUI for Fitting Data Comparison - Case 2 50 Fig. 3.6 Proposed Line-Section for Z - Line Model 52 Fig. 3.7 Diagram of Transmission Line 52 v i i i Fig. 3.8(a) Exact n Circuit 56 Fig. 3.8(b) Cascaded Exact n Circuit 57 Fig. 3.9 Line Configuration of Case Studies 61 Fig. 3.10 Section Length Relationship Curve for Case 1 - / m a x = 8000tfz 62 Fig. 3.11 Section Length Relationship Curve for Case 2 - / m a x = 1000Hz 63 Fig. 3.12 Line Configuration of Real Cases 67 Figure 3.8 Z - Line maximum section length vs. maximum frequency of interest 69 i x A C K N O W L E D G M E N T S I would like to thank several people for their contribution to this thesis: • To my parents for their continuous love and encouragement. • To Dr. J. R. Marti for his supervision and financial support. • To Dr. H . W. Dommel for his unconditional assistance. • To Jesus Calvino, Meliha selak and Tinh-Chung Y u for their inspiration and help. • To all my fellows in the U B C Power Group for their help. x C H A P T E R 1 STATISTICAL A N A L Y S I S OF SWITCHING SURGES D U R I N G E N E R G I Z A T I O N 1.1 INTRODUCTION Switching surges during equipment energization is a usual phenomenon in electrical power systems. One of its important influences is in protection systems design. It is known theoretically that transient overvoltages depend very much on the fault initiation angle, that is, the angle of the voltage at the moment the fault occurs. Transient overvoltages during line energization can be minimized with controlled closing when the voltages are more or less equal on both sides of the circuit breaker contacts.121 But practically it is very difficult to guarantee that the closing time is exactly the one assumed in the theoretical analysis. In addition to that, in multiphase switches all contacts cannot be closed at exactly the same time, and the largest overvoltage may even occur when the fault happens at the maximum value of the voltage in one of the phases (in single-phase analysis this case corresponds to minimum overvoltage). For system insulation design, it is necessary to know the maximum possible overvoltage that may occur in the system. The higher the reliability of the system, the more expensive the protection system will be. Since the overvoltages are produced randomly, their probability of occurrence is relatively very low. From the point of view of economy of the protection system design, it is not necessary to guarantee 100% reliability. 1 In general there is always a compromise between high reliability and economy of design. If the regularity of the overvoltage occurrence can be found beforehand, a, system may be designed to balance from both points of view. The whole procedure implemented to assess the statistical distribution of overvoltages during circuit breaker operations follows four steps: • Step 1 Generate the input data file. • Step 2 Run the case many times to get enough random samples of the phase voltages. • Step 3 Apply statistics theory to the phase voltages to get their statistical characteristics. • Step 4 Set up the protective level of the system considering both high reliability and economy. 1.2 SOME STATISTICAL CONCEPTS [ 6 ] [ 7 ] Statistics is used to make inferences and draw conclusions from the sample so as to obtain a deeper understanding about the population that they represent. Random Sample Generally it is impossible to get all the populations, so a good sample is needed from which the mean can provide us with an estimate of the population mean, and the standard error of it a ( ~ 7 = ) can give us an indication of the variability of the sample mean. A random sample is preferred in statistical analysis for a better representation of the population at large. Two important features of random samples are: • Each unit of the population has an equal chance of being selected. 2 • Units of the sample are chosen independently of each other. Statistical Mean and Variance The mean, also called expected value, is a measure of central tendency. It describes the center of a distribution. fd = - for discrete random variables x • f(x) • dx - for continuous random variables The variance is a measure of the variability or randomness of the distribution. It describes how far an observation will typically be from the mean. cr2 = ——~E(X/ ~ M)2 " f ° r discrete random variables 2 2 cr = (x - ju) • f(x) • dx - for continuous random variables J-CO The square root of the variance a is the standard deviation. Standard Normal Distribution The normal distribution is one of the most useful and widely used continuous probability distributions. Its probability density function (PDF) / ( x ) is the well-known bell-shaped curve and is given by: 1 The standard normal distribution, sometimes called the z distribution, is one special normal distribution with a mean of 0 and a standard deviation of 1, as shown in Figure 1.1. 3 - 4 - 3 -2 -1 0 1 2 3 4 Standard deviation units (or z - s c o r e s ) Fig. 1.1 Standard Normal Distribution Since the standard normal distribution function cannot be expressed in terms of elementary functions, the values of its PDF function have been approximated and given in the "Table of the Standard Normal Distribution". Therefore the percentage of cases being above or below any given number can be obtained directly from the table when the mean and standard deviation are known. The only prerequisite is that the normal distribution has to be converted to the standard normal distribution by the formula: x - u Z = . a Where x - A score from the original normal distribution. ju - The mean of the original normal distribution, cr - The standard deviation of the original normal distribution. Two Important Theorems • The law of averages (law of large numbers): If the sample size is large, the probability is high that the sample mean is close to the mean of the parent population. 4 • The central limit theorem: If the sample size is large, the distribution of the sample mean of N independent observations is well approximated by a normal distribution. 1.3 CASE INTRODUCTION A practical simple case " J A G U A R A - T A Q U A R I L LINE ENERGIZATION", taken from a Brazilian utility company and provided to us by Dr. H. W. Dommel, is used as an example in this project to implement the statistical data analysis procedure. Network Configuration The network configuration of the system is shown in Figure 1.2. [X]-matrix J A G U A R A TAQUARIL OOO circuit breaker with closing resistors, all R = 400 ohms transmission line 247.36 miles, transposed [X]-matrix Thevenin equivalent for generators and transformers shunt reactor Fig. 1.2 Network Configuration The power plant is represented as three voltage sources behind a three-phase matrix of reactance, [X] with Xs = 77.65Q and X m = -21.95Q. Before the circuit breaker closes, a line-to-line voltage 328kV rms is used as internal voltage behind the three-phase [X]-matrix. 5 The phase angles are such that the voltage source of phase A passes through zero at t = 0 heading for negative values. Since the results are to be shown in per unit of the pre-closing voltage of 328kV, voltages of-l.Op.u. are used in the simulation. The circuit breaker consists of two contacts: main and auxiliary. The auxiliary contacts are connected in series with closing resistors of 400Q. The auxiliary contacts of each phase close first, and the corresponding main contacts close about 7ms later. A three-phase 440kV, 91Mvar reactor is connected at the sending end of the J A G U A R A -V2 4402 TAQUARIL transmission line. Xpos = ~q= = 2127.4725Q. Since Xzero = 0.35 Xpos 2 * Xpos + Xzero „ „ Xs = => X s = 1666Q,Xm = -461Q. 3 Xzero - Xpos Xm = — 3 The J A G U A R A - T A Q U A R I L transmission line (247.36 miles) is transposed and is represented with distributed parameters calculated at 60 Hz: Rpos = 0.055 Q/mile, Xpos = 0.603 Q/mile, Cpos = 18.99 nF/mile, Rzero = 0.5178 Q/mile, Xzero = 2.0385 Q/mile, Czero = 12.88 nF/mile. Input Data File and Simulation Results The input data file is shown in Table 1.1. The waveforms of phase voltages are shown in Figure 1.3 to Figure 1.5, where the solid line represents the voltages of J A G U A R A and the dotted line represents the voltages of TAQUARIL. 6 Table 1.1 List of Input Data File * F i l e : PJA.DAT *** WARNING: THIS IS A COMPUTER GENERATED FILE!!! C LINE ENERGIZATION. FROM: H.W. DOMMEL ET AL, CASE STUDIES FOR ELECTROMAGNETIC C TRANSIENTS, MAY 1983 (LATEST REVISION JAN. 1991). . Case i d e n t i f i c a t i o n card JAGUARA TAQUARIL LINE ENERGIZATION 60. * . Time card 0 .0001 0.050 0 1S1A JAGTA 77 . 65 2S1B JAGTB -21.95 77.65 3S1C JAGTC -21.95 -21.95 77.65 1JAGA 1666 . 2JAGB -461. 1666. 3JAGC -461. -461. 1666. -1JAGA TAQA .5178 2.0385.01288247.36 -2JAGB TAQB .055 0.603 .01899247.36 -3JAGC TAQC $ = .= * End of l e v e l 1: Linear and nonlinear elements = = = = = = = = = = = = * . Time-controlled switch JAGTA JAGA 0.0084' 1.0 400 . JAGTB JAGB 0.0071 1.0 400. JAGTC JAGC 0.0081 1.0 400 . • JAGTA JAGA 0.0158 1. 0 JAGTB JAGB 0.0144 1. 0 JAGTC JAGC 0.0151 1 . 0 $ = = = 4-End of- l e v e l 2 : Switches and piecewise l i n e a r elements C The oscillograms from the f i e l d t e s t had the wrong p o l a r i t y . To compare C d i r e c t l y with the f i e l d t e s t oscillograms, we reverse the p o l a r i t y of C the source voltages here * * . Voltage or current sources 14S1A -1.0 60. 0 90. -1.0 14S1B 1-1.0 60. 0 -30. -1.0 14S1C C i — 6 0 • 0 210. -1.0 $ = = = End of l e v e l 3 JAGA JAGB JAGC TAQA TAQB TAQC $ = = = End of l e v e l 4 : User-defined voltage output = = = = = = = = = = = = = $ = = = In this project, for the purpose of protection systems design, both three-phase voltages of the sending end J A G U A R A and of the receiving end TAQUARIL are specified in the input data file to be included in the output file as shown highlighted in Table 1.1 Level 4 User-Defined Voltage Output. 7 2 00 JAGUARA TAQUARIL LINE ENERGIZATION Uoltages. Scale: 10**(0) 1.00. ' 1 1 1 1 t • 0.00 1 ' U \ Jl \ 1 JAGA 1 TAQA \ / 1 I tJ' \ J -l.00_ ' "* \ ' / 1 \ _7 -2.00 ' « H , , , , , , , , , , , , , , 1 . , , . 1 . . . . 1 0.00 0.10 0.20 0.30 0.40 0.50 Tine scale: 10**(-1) s. Fig. 1.3 Voltages on Phase A 0.00 JAGUARA TAQUARIL LINE ENERGIZATION Uoltages. Scale: 10«*(0) i / 1 ( \ r< J ' \ - 1 f \ ' 1 ' A ^ / \ 11 \ i ' / 1 " r \ • / ), ' / V I | ^ \ ' / \ i / x / 1 \ 1 ' ' / \ f\f \ if * \ , J A 1 TAQB 1 JAGB I i A | y v / \ / ' V V i V / 1 \ •At' \ f' 1 \ V ' \ / i \ ) i i W i \ J i i \ / 1 1 • t , ' ' « H 1 1 1 1 1 1 1 1 1 1 , 1 • . 1 1 1 1 1 1 . 1 1 1 1 0.00 0.10 0.20 0.30 0.40 0.50 Tine scale: 10**(-1) s. Fig. 1.4 Voltages on Phase B 8 2.00 1.00J 0.00 -1.00 -2.00 -3.00. 0. JAGUARA TAQUARIL LINE ENERGIZATION . UoItages. Scale: 10»» (0 ) f 1 ' ' " —ft"' ' l ' ' / 1 JAGC 1 TAQC l ' ' / * 1 ' / 1 J i \J, ' I f \ i i ' \ / " I / 'I / 1 f 1 fi i t i /• ' \ / ' 1 f ' \ / ' i ^ ' « H , , , ^ — , , , , , , , , , , , , , . 1 . . . . 1 0.00 0.10 0.20 0.30 0.40 0.50 Tine scale: 10**(-1) s. Fig. 1.5 Voltages on Phase C 1.4 PROGRAM IMPLEMENTATION As discussed in section 1.2, random samples are preferred for statistical analysis because of their distribution and they will be used in this project for characteristics of switching closing time. In addition, according to the central limit theorem, a larger amount f data is needed in order to get the approximate normal distribution. This means that the switching closing time needs to be changed many times and the executable program mt.exe needs to be executed many times as well. The objective was to perform all these runs automatically without user interference. The procedure implemented follows four steps. 9 Generate Input Data File The input data file is generated by one program (PRJ.C) written in C instead of by the standard preprocessor mtd.exe where data are input by hand. The C - language random number generator function - random (JV) is used to generate the switching closing time randomly. Among the 300 switching closing time supplied with this actual case, all but one is less than 34ms, and the maximum difference between each phase switching closing time is 5ms. So two random number generators are used, one for generating the base closing time and the other for controlling the actual switching closing time of each phase. As defined in mtData, time is expressed in units of seconds. So the switching closing time in ms needs to be converted to in seconds. In order to keep the precision of the switching closing time to 5 decimal places (0.0****), the two generators are set up as random (2901) and random (501), respectively. The implementation of the random switching closing time procedure is shown next. Mefine T 2901 /* Define time basis */ #define R 501 /* Define time difference */ maintime = random(T); /* Generate time basis */ offl = random(R); /* Generate time difference of phase A */ off2 = random(R); /* Generate time difference of phase B */ off3 = random(R); /* Generate time difference of phase C */ swtl - ((double)(maintime+offl))/100.0*le-3; /* get real closing time of phase A */ swt2 = ((double)(maintime+off2))/l00.0*1e-3; /* get real closing time of phase B */ swt3 ~ ((double)(maintime+off3))/100.0*le-3; /* get real closing time of phase C */ 10 Get Needed Data In the JAGUARA-TAQUARIL example, the main contacts of each phase circuit breaker are assumed to close 7ms after the corresponding auxiliary contacts close, and only the closing time of either auxiliary or main contacts are needed. A program (GETOUT.C) was written to read the needed data from the input and output data files. There was a large amount of data in both files, so the main difficulty was how to find the needed data. Keep Case Running This was the most difficult part of this project. As stated clearly in the law of large numbers and central limit theorem, the sample size should be large. So this case should be kept running many times in order to satisfy the prerequisite of these two theorems. Since MicroTran's executable program mt.exe occupies a large amount of memory every time it is called, due to memory leaks problems in the windows environment, it is proved impractical to load the program repetitively under windows. A better approach, since mt.exe is a native DOS program, is proved to be to write a DOS batch file for these repetitive runs. The batch file (PROJECT.BAT) is as follows. Part 1: prj>pja.dat /* Run prj.exe and save results to "pja.dat" */ mt pja.dat /* Run mt.exe with input data file "pja.dat" */ getout > pja.m /* Run getout.exe and save results to "pja.m" */ Part 2: prj> pja.dat mt pja.dat 11 getout » pja.m /* Append new results to "pja.m" */ Part 2 will be repeated N -1 times where N is the total running times. has to be defined in advance. After many tests it was found that only when the case was kept running more than 800 times the distributions of the 6 phase voltages were more or less similar to the normal distribution. In this project in order to save computational time as well as obtaining good results, N was taken as 1000. The results of each run were saved in a separate file "pja.m". Statistical Data Analysis After obtaining all the sample data, it was easy to calculate the mean and variance or standard deviation of these data. Since there are some ready-made statistical data analysis functions in M A T L A B , such as mean (X) - mean of columns and std (X) - standard deviation of columns, the mean and standard deviation of the sampled data and the percentage of cases being above certain amount can be calculated easily. For this reason, the statistical analysis program (PRJ.M) was written in M A T L A B . 1.5 ANALYSIS OF THE RESULTS Result 1 After running the simulator 1,000 times and applying statistical theory to analyze the phase voltages, the mean, standard deviation, maximum value and minimum value of each phase voltage were obtained as shown in Table 1.2. 12 Table 1.2 Statistical Analysis of Phase Voltages (1) Mean Standard Deviation Maximum Minimum J A G U A R A - A 1.4904 0.0715 1.7399 1.3001 J A G U A R A - B 1.4890 0.0732 1.6968 1.2956 J A G U A R A - C 1.4881 0.0680 1.7197 1.2974 T A Q U A R I L - A 1.9891 0.1184 2.3321 1.7224 TAQUARIL-B 1.9683 0.1202 2.2609 1.6990 TAQUARIL-C 1.9789 0.1194 2.2740 1.7188 As mentioned in section 1.2, the values of the PDF function of standard normal distribution have been approximated and given in the "Table of the Standard Normal Distribution". In order to use this table, the normal distribution has to be converted to standard normal x — JU distribution using the formula Z = . In this project, the procedure to get the percentage cr of phase voltages being above certain amount is as follows. • First get the values of the PDF function at several typical probabilities from the table. Here the probabilities of 90%, 95%, 97.5% and 99% are used, and the corresponding values of Z are 1.282, 1.645, 1.960 and 2.326. Interpolation is used for those values that cannot be found directly from the table. • Then obtain the normal distribution X0 from Z , ju and cr using the formula: X0 = Z-CT + JU'. Where Z is obtained from the "Table of the Standard Normal Distribution", ju and a are obtained from Table 1.2 for each probability. • At last, check the sampled data of the phase voltages to count how many of them are larger than the value of X0, then the percentage of phase voltages being above XQ can m be calculated easily by (%) = * 100% , where m is the counted number. 13 The results of percentage of each phase voltage are shown in Table 1.3. Table 1.3 Percentage (1) 90% 95% 97.5% 99% Vol . % Vol. % Vol . % Vol . % J A G U A R A - A 1.5820 8.6; 1.6080 5.6 1.6305 3.7 1.6566 1.4 J A G U A R A - B 1.5829 9.6 1.6095 6.4 1.6325 4.1 1.6593 1.4 J A G U A R A - C 1.5752 7.2 1.5999 5.1 1.6213 3.6 1.6462 1.7 T A Q U A R I L - A 2.1408 11.6 2.1838 5.7 2.2211 ?•]] 2.2644 0.8 TAQUARIL-B 2.1224 12.4 2.1660 6.9 2.2039 2:0 2.2479 0.5 TAQUARIL-C 2.1320 13.1 2.1753 5.8 2.2129 1.7 2.2566 0.3 Result 2 To consider the randomness of the sampled data, the batch file is executed again to get another sets of data. The results of statistical analysis and percentages of each phase voltage are shown in Table 1.4 and Table 1.5, respectively. Table 1.4 Statistical Analysis of Phase Voltages (2) Mean Standard Deviation Maximum Minimum J A G U A R A - A 1.4905 0.0675 1.7093 1.2936 J A G U A R A - B 1.4863 0.0747 1.7260 1.2733 J A G U A R A - C 1.4858 0.0701 1.7229 1.2979 T A Q U A R I L - A 1.9800 0.1135 2.2887 1.6931 TAQUARIL-B 1.9809 0.1239 2.3182 1.6968 TAQUARIL-C 1.9793 0.1155 2.2927 1.7244 Table 1.5 Percentage (2) 90% 95% 97.5% 99% Vol . Per. Vol . Per. Vol . Per. Vol . Per. J A G U A R A - A 1.5770 P 1.6015 4.6 1.6228 2.8 1.6475 1.2 J A G U A R A - B 1.5821 8:9 1.6092 5.8 1.6328 3.3 1.6601 1.4 J A G U A R A - C 1.5757 7.9 1.6012 4.9 1.6232 3.1 1.6489 1.5 T A Q U A R I L - A 2.1256 10.8 2.1668 4.8 2.2026 2.0 2.2441 0.5 TAQUARIL-B 2.1398 14.0 2.1847 5.5 2.2238 ;1:6 2.2691 0.2 TAQUARIL-C 2.1273 12.3 2.1692 5.8 2.2056 p; 2.2479 0.7 14 For testing purpose, the batch file as executed several more times, and every time similar results were obtained. Set Protective Levels According to the results in Table 1.2 and Table 1.4, the maximum voltage at the sending end J A G U A R A is not very high (1.7399), while at the receiving end T A Q U A R I L it is much higher (2.3321). Therefore, it is not necessary to set the protective level at J A G U A R A to very high reliability, while at TAQUARIL a higher reliability is recommended. According to the results in Table 1.3 and Table 1.5, it is found that: • At J A G U A R A the sampled data can only guarantee 90%, not higher, probability. This also proves that it is not necessary to set a high reliability protective level at this end. • At TAQUARIL the sampled data can guarantee both 97.5% and 99% probability, hence the protective level can be set to be either 97.5% or 99%. Since the higher the protective level is set, the more expensive the protection system will be, and the extreme overvoltages occur very seldom, less than 1%, the higher protective level is not recommended from an economic point of view. Based on the results of statistical data analysis, finally the'protective level is set to be 90% at the sending end J A G U A R A and 97.5% at the receiving end TAQUARIL , from both points of view, high reliability and economy. 1.6 CONCLUSION Purpose of This Project 15 As mentioned in section 1.1, there is a trade off between high reliability and economy for protection system design. The setting of protective level plays an important role on determining the insulation design and cost. The higher the protective level is set, the more reliable but more expensive the protection system will be. The setting of protective level depends on the distribution of phase voltages, especially on the overvoltages. Since overvoltage depends on Vsource at the instant of breakers closing and usually all three poles of the breaker do not close simultaneously, the overvoltages are statistically distributed'21. Therefore the statistical data analysis method can help in setting the protection level properly. For statistical analysis a large amount of random samples are needed in order to represent the entire population well. Although MicroTran can help the user perform a simulation given the system configuration, it needs user intervention to input data i f using mtData. This is not convenient for the user, especially in statistical analysis where the program needs to keep running 1,000 or even more times. The purpose of this project was to realize the whole procedure of statistical analysis automatically, from generating the input data file to getting the statistical cgaracteristics of each phase voltage. Programming Features 1. The programs for this project were written in different languages in order to simplify the programming tasks by utilizing many ready-made functions. For example, • The program PRJ.C was written in C. The random number generator function - random (N) was used to realize the changing of the switching closing time randomly. 16 The program PRJ.M was written in Matlab. The functions mean (v) and std (v) were used to obtain the mean and standard deviation of each phase voltage directly given the sampled data. A l l written programs are easy to transplant and modify, so that they can be used in many applications related with statistical analysis, such as: Statistical insulation design for switching surges, which performance is measured in terms of the probability of flashover. Economic design of overhead line systems, which can be realized by reducing the switching surges. In this situation, these programs can be modified to change the line parameters randomly so as to select the best combination of parameters with the least switching surges. 17 C H A P T E R 2 GUI F O R DATA INPUT A N D V A L I D A T I O N IN M I C R O T R A N 2.1 INTRODUCTION The Transient Analysis Program for Power and Power Electronic Circuits - MicroTran is an implementation for personal computers of the Electromagnetic Transients Program E M T P [ 3 ] . It has many features that make it a very powerful tool for transient analysis as well as steady-state analysis. • It solves the differential equations of the electric network in the time domain from t - 0 to t = Tmm with a time step specified by the user. • It includes a large number of models, from very basic circuit component, such as linear and nonlinear R, L , C, to very complicated system equipment, such as multiphase transmission lines. One disadvantage that hinders its application is that its data input interface - mtData is not very user-friendly. For example, the user has to input data strictly according to the required format of units and characters; and for some components, e.g., nonlinear and piecewise elements, some pre-calculations have to be done to obtain the required model data. These issues make MicroTran not so easy to use for those who are not very familiar with the representation of system components for fast transients simulations. The project described in this chapter was intended to make data input more easy and efficient for the user of MicroTran. New data input cards were designed to simplify data entering. Transferring of these data to the required format was done by one program 18 internally. The user only needs to click the "GENERATE" button on the GUI. As a result, the user can pay more attention to other tasks such as interpreting and analyzing the simulation results instead of spending large amounts of time in creating input data files. 2.2 GRAPHICAL USER INTERFACE (GUI) DESIGN 2.2.1 Panel Introduction New data input cards for all the components included in MicroTran except synchronous machines and non-ideal transformer were designed in this project. In total, there are one main-panel for inputting the general information of the simulation, seven child-panels and eighteen grandchild-panels for inputting the detailed information of each component. Some components in the same child-panel group will share one grandchild-panel by changing the labels of some items or disabling some controls in the grandchild-panel to simplify the GUI design. Main-Panel Case identification card, time card, component selection and seven main command buttons used to control the program flow are included in the main-panel as shown in Figure 2.1. In the case identification card, "CASE TITLE" is used to input the purpose of the simulation or whatever the user likes. As required in mtData, the first four characters must not be blank. So i f the user leaves this item blank, the program will save "test case" as default in the generated dump file. The values of "XOPT" and "COPT" are used to determine whether the 19 inductance is interpreted as L (if XOPT = 0 ) o r a>L (if XOPT * 0) and the capacitance as C (if COPT = 0) or co C (if C O i T * 0) in the grandchild-panels. Since these values may be referred to in several components, they are included in the main-panel. r Input Data for MictoTian (c) Dai Nan 1999 C A S E IDENTIFICATION C A R D CASE TITLE] test case a n S A V E XOPT \t 60.00 COPT ^0.00 TIME C A R D Delta tZOQQ us • Trnax '30.01 s • AC steady-state solution No complete printout •[ Fminj~0 00 Hz • i DeltaFHO.OO ! Hz • ! "•Ml:"'1: ^ A^^^^-^~^-J - ~ ^ ^ - ^ - ~ ^ J CDAtechnique^ Used l*i^ G E N E R A T E MODIFY RUN Hz • ! PLOT H E L P Component Selection 1 Tr; Line Se lec t ) QUIT Fig. 2.1 GUI of Main Panel In the time card only the most often used items are included, such as "Delta" and "Tmax" for transient simulation, "Fmin", "DeltaF" and "Fmax" for frequency scan simulation, and " C D A technique" for determining if the C D A (Critical Damping Adjustment) technique will be used in the transient simulation. Other fields defined in mtData can be added easily if needed. The "Select" command button to the right of "Component Selection" (Fig.2.1) is designed to select which child-panel to display next for data input. In MicroTran according to the nature of the network components, the input data file is divided into six sections: linear and nonlinear branches, switches and piecewise linear components, sources, user-supplied initial conditions, node voltages output, and point-by-point user-defined sources.' 4 1 2 0 In this GUI design, according to the requirements of the input data, seven child-panels are designed for lumped elements, distributed parameter transmission lines, switches, voltage and current sources, transformers, user-supplied initial conditions and output of node voltages, each with several grandchild-panels. GUI designed of some typical child-panels and grandchild-panels are explained in detail in what follows. The seven command buttons on the right-hand side of the main-panel are used to control the simulation procedure from inputting data to getting results. • " S A V E " is used to save the information supplied in the identification card and time card. It has to be executed to save those indispensable data for simulation purposes. • " G E N E R A T E " is used to launch the program to transfer the input data to the required format internally. It has to be executed to obtain the input data file in the required format after user inputs all the information of electric network. • " M O D I F Y " is used to launch the executable program mtd.exe to modify the transferred input data file when only minor modifications are needed to save user from re-inputting all the information. • " R U N " is used to launch the executable program mt.exe to perform simulation. • "PLOT" is used to launch the executable program mtplot.exe to show the results. "MODIFY", " R U N " and "PLOT" are optional. They are included here in case the user wishes to see the results immediately after he inputs all the information. And from my GUI design experience, this can help me check whether the data filter program works correctly. • " H E L P " is used to explain the function of this program. • "QUIT" is used to quit interface and stop the whole procedure. 21 Child-Panel and Grandchild-Panels of Lumped Elements Eight grandchild-panels are designed for lumped elements. They are for lumped linear R, L, C and surge arrester - model 1; piecewise linear and nonlinear resistance and surge arrester-model2; piecewise linear and nonlinear inductance; time-varying resistance; zinc-oxide arrester; Pi-circuits; coupled inductance; diodes and thyristors. Two typical grandchild-panels are shown in Figure 2.2 and Figure 2.3. Lumped R. L. C Elements Return Model Piecewise Linear R e s i s . • [Output) Vol tage / kA • 6.25 j 12.92 • • 5 5 0 W W A u t o r~ A d d / R e m o v e A D D " ) R E M O V E ) ; in.on p h m ~ BUSA SAVE Node Ml BUSEJ Fig. 2.2 GUI of Piecewise Linear Resistance The data pairs (i,v) on the right upper corner (Fig.2.2) are added to the left-hand side list automatically if "AutoAdd/Remove" is enabled or added by clicking " A D D " otherwise. And the check modes of both lists are enabled so the data pair can be removed from the lists by clicking to the left of the corresponding data in the list when "AutoAdd/Remove" is enabled. This GUI is also shared by nonlinear resistance and surge arrester - model2. Since the item "Vspark" is not used in the case of a piecewise linear resistance, it is dimmed in Figure 2.2. When it is needed by surge arrester - model2, it can be activated by function: 2 2 SetCtrlAttribute (Panel Handle, Control ID, Control Attribute, Attribute Value), where attribute value 0 means control enabled. Lumped R , L C Elements Return Model! ™ t ;PI-Matrix (Balanced) {Output; Current J T o t a l P h a s e N u m b e r w$ J A c c u r a c y j Normal • [ Sel f Mutual ] R _ J ^ 0 . 0 0 0 0 | | 0 .0000 | Ohm L / X . 1 77.6500 0-21.9500 . Ohm C/S 0 0.0IJ00 % 0.0000 I uF S A V E N a m e s for P h a s e ~j 2 Node K. s1b S A V E Node Mi jagtb Fig. 2.3 GUI ofPI-Circuits For symmetric n - circuits and mutually coupled branches high accuracy in R , L and C -input values may be required. So two accuracy options are supplied - normal (E6.0) and high (E17.0) (Fig.2.3). And in this example, XOPT = 60.0, so the unit of L / X is Ohm (Q) instead of H; COPT = 0, so the unit of C/S is uF instead of S. Child-Panel and Grandchild-Panels of Distributed Parameter Transmission Lines In this GUI design, only the constant parameter line model is realized and three grandchild-panels are designed, for balance lines (Figure 2.4), unbalanced lines (Figure 2.5), and data validation separately. There are three input options according to the constant parameter line model in MicroTran, and they will share the same grandchild-panels. In the child-panel, both "Line Type" and "Input Option" have to be selected first in order to display correct grandchild-panel with correct items. 2 3 Transmission Line 13 Phases . Return | _ . _ Line Model) Names for P h a s e d 2 ] CP - LINE • Parameters for Ground Return M o d e ^ NodeKJ node3 Line Type) Resistance R $ 0 1 960 J Ohrn_ • Node MBnode4 Balanced Surge Impedance Zc Z12 4870 MUhm • S A V E ) Input Option! Travel Time Tau 110.3250jjms • R Zc, Tau • Length C 1 0 0 . 0 0 0 0 km • ! S A V E ) C H E C K ) S A V E ) ir 1 f r " ^ . . ^..tjr Output Voltage "*\ Fig. 2.4 GUI of Balanced Lines For balanced transmission lines, negative sequence parameters are assumed to be the same as positive sequence parameters, so "Parameters for" in the grandchild-panel has only two options: ground return mode (zero sequence mode) and line mode (positive sequence mode). Parameter data validation has been implemented for this case. The " C H E C K " button on the left bottom of the grandchild-panel is used to call the data validation engine to help the user make sure that correct data has been input. Transmission Line] 3 3 Phases Return | Line Model | Parameters for Phase % 2 Names for Phase C | C P - L I N E • ! Resistance \$ 10.5000 Ohm • CHECfe NodeK node5 Line Type) Surge Impedance)^ 200.0000! Ohm • S A V E ) NodeM[ node6 Unbalanced • ! i Travel Time | ^  €.5000 rns • S A V E ) Input Option 1 R Z c , Tau • [ Trans. Matrix Add Item Length'5 1 0 0 . 0 0 0 0 km < rj i 50 f" 1-0.51 1 0 -1 j — ^ S A V E ) A D D / • SAVE^) [Output! Current & Voltage 1 r Fig. 2.5 GUI of Unbalanced Lines 24 For unbalanced transmission lines, the parameters of each mode are different and they have to be input mode by mode. Since the model is based on mode decoupling, the user should supply the transformation matrix required for the diagonalization process. Unfortunately data validation has not yet been implemented for the unbalanced case. Child-Panel and Grandchild-Panels of Switches Two grandchild-panels are designed for switches, one for time-controlled switches (shown in Figure 2.6) and one for voltage-dependent switches. Switch Return ModeJ [ {T ime-contro l led |6utput] Current Node Names Node Kj nodei Node Ml node3 *0.00 * kA Rswitch SAVE Fig. 2.6 GUI of Time-Controlled Switches For time-controlled switches there may be more than one optional time criteria that define the close-open sequence of switching operations, so two lists of "Tclose" and "Topen" are included in this GUI design. Child-Panel and Grandchild-Panels of Voltage and Current Sources Four grandchild-panels are designed for voltage and current sources. They are for sinusoidal functions; step, pulse and ramp functions; surge functions, and piecewise linear composite functions (shown in Figure 2.7), separately. 25 Voltage & Current Source Return Source! Voltage Character Permanent • Time! ms Source kV • F 30 35 37.5 AS 65 95 25 30 40 4S 50 40 Time Source Auto Add/Remove A j j r T ) REMOVE) iNode Namel s r 1 SAVE*) Fig. 2.7 GUI of Piecewise Linear Composite Function of Source For piecewise linear composite functions, the values of the source are a function of time. In the original mtData program some pre-calculations have to be done by the user to transfer the data pairs of (t,v) into the data required in mtData. In this new GUI design, the user only needs to input these data pairs point by point without requiring pre-calculation. Other Panels The child-panels and grandchild-panels of transformers, user-supplied initial conditions and output of node voltages are not too complicated or special, and they are not described here to save space. In addition, for transformers, only the GUI of ideal transfer is implemented, which only includes two groups of node names and the turns ratio. 2.2.2 Data Validation Engine As mentioned before MicroTran is a powerful power system transient analysis program, but one difficulty in studying transients is that the user is often not as familiar with the data 2 6 required for transient modeling as with those required for traditional steady-state studies. One reason is that the parameters given by handbook formulas are usually for 60Hz while, on the other hand, higher frequencies are usually involved in transient studies. A data validation e n g i n e h a s been developed at U B C ' s power group, which can help the user make sure that correct data has been input for transient simulations. This engine has been implemented in this GUI design for balanced overhead transmission line parameters. GUI forms for data validation of positive sequence and zero sequence mode parameters of transmission lines are shown in Figure 2.8 and Figure 2.9. Overhead Transmission Line Parameters Input Opt ion 1 R, Zc, Tau P a r a m e t e r s for) Positive Sequenc e M u a e Resistance R 0.0186 [phrri w Surge Impedance Zc JL (238^600 Ohm Travel Time Tau • 3^02 m s A d d . In fo rmat ions ! Voltage Level \ 0 500 j k'V Bundling Bundling Spacing ' 0 0 457 lm • Line Configuration! 0 Horizontal J Frequency j B6Q.00 1 Hz " Earth Resistivity 0 1 00 00 Ohm-m •w Length 0100.0000 [km H B E I Rea l i t y Check; min max • 1.0258E-02 I2.5758E-02 [2;3985E*02 :| |2^6'99E*02 [3.4013E^0"1 "j i3AW?E-0r V a l i d a t i o n Resu l t s ! f Surge impedance is out of range! CHECK ) Q U I T Fig. 2.8 GUI of Data Validation for Positive Sequence Mode Parameters The data validation engine consists of two parts: i) an extensive database of typical parameters of power system components and ii) formula based validation processes, where a set of algorithms are used to rebuild transient data and to check user entered data for physical 2 7 validity and mathematical consistency. The validation is performed hierarchically according to the sensitivity of the parameters to the specific situation. Based on the information supplied, the engine will return a range of typical parameters for the specified data. m Overhead Transmission Line Parameters Input Opt ion R, Zc. V • P a r a m e t e r s for Zero Sequence Mode R e a l i t y Check m m Resistance R t n 1 Rnn ; Ohm H1.8142E-01 a ii £571 E :Cr j Surge Impedance Zc • j | j I l 4 7 D 5 E + D " O l ; MB89E+02™ Wave S p e e d V 1 97.4000 krn/rns •wl : - 972|E^02 J fT"9757E*02 1 A d d . In format ions V a l i d a t i o n Resu l t s ! Voltage Level J q:760 kV • (Resistance is out of range! Bundling Bundling Spacing! C ] 457 |m Line Configuration: [ D e l t a Frequency j t soToo j Hz Earth Resistivity I V 1 00.00 | Ohm-m i C H E C k j Q U I T I Length | 200.0000 Fig. 2.9 GUI of Data Validation for Zero Sequence Mode Parameters The data validation engine proceeds in two stages: • First consult the database of pre-stored typical parameters. • Then if not found directly in the database, derive the parameters from a reconstruction process using analytical formulas. For the case of overhead transmission lines, the complex penetration depth formula p = A where p0 - earth resistivity, / / 0 - earth permeability, makes it easy to obtain the closed form expressions for ground return effects within a large range of frequencies. 28 For validation of balanced overhead transmission line parameters, before the engine is called, the user needs to choose the sequence mode in "Input Option" which has three options according to the "Constant Parameter Line Model" in MicroTran. These three options are R (resistance), L or ©L (inductance or reactance), C or coC (capacitance or susceptance); R, Zc (surge impedance), V (wave speed); and R, Zc, Tau (travel time). Apart from this required data, the user can optionally supply additional information, such as nominal line voltage, number of conductors per bundle, bundle spacing, tower design, frequency and ground resistivity. These extra information items are optional but the more of them supplied the narrower and more accurate the range of possible viable parameters the engine will return. After the user supplies the information can clicks the " C H E C K " button, the engine returns the range of typical parameters for the specified data in fields "min" and "max". If the user's supplied values are out of the expected ranges, error messages will be listed in "Validation Results". 2.2.3 Popup Windows In this GUI design a number of popup windows are included for the purposes explained next. Reminders of Special Input and Save Sequences Although for most components the data can be input and saved in any sequence, in some cards special sequences have to be followed. 29 • Example 1 Input of "XOPT" in the identification card. As mentioned before, the value of "XOPT" determines the units of inductance L in mH (if XOPT = 0 ) or as coL in Ohm (if XOPT * 0 ) in the grandchild-panels, so it has to be input before related grandchild-panels are displayed with correct units. • Example 2 Save information of multiphase transmission lines. There are a lot of data needed for multiphase transmission line systems. They are divided into two groups: line parameters and node names. In the data filter program, the line parameters are treated first, then the node names. In order to simply data transfer in the filter program, the line parameters are saved before the node names. A confirmation window titled "Save parameters" will popup before the node names can be saved to the dump file to remind the user of saving the line parameters first. Check for Data Completeness In some cases some extra data is needed but it is easy to forget to input. For example, for data validation of overhead transmission line parameters, when the input option is 2, R, Zc and Tau are essential parameters; however, the length is also needed by the validation engine to check the input value of Tau. A message window titled "Length" will popup in case the user forgets to input it. Only when all the needed data are input, the data validation engine can proceed. Check for Data Correctness For some components some of the parameters are limited within certain ranges, but it is very easy to input wrong values if user does not pay much attention to these ranges or does not 30 know the characteristics of the components very well. For example, for diodes the value of degree " P " has to be any negative real number to indicate that it is a diode rather than a thyristor, while for thyristors it has to be a non-negative number. When the user inputs a value out of the expected range, a message window titled "Data Error" will popup to remind the user of double-checking the data. Inform the User of the Function of the Command Buttons Every command button except " H E L P " in this GUI design, including those in the main-, child- and grandchild-panels, has message window popup when the user right-clicks the button. These popups inform the user of the function of this command. If the user is not familiar with or not sure of the command, he can right-click it to see i f it is the right command he wants to execute. For the " H E L P " button, both left- and right-clicks return the function of this program and the procedure for the program's execution. 2.3 DATA FILTER IMPLEMENTATION After the user inputs all the information of the electrical system, he can click the "GENERATE"'button in the main-panel to transfer the dumped data file into the required format to run MicroTran. The command " G E N E R A T E " will call the data filter program: int generate (void) to take care of doing all the data transfer internally without user intervention. In this program much attention is given to the following details. 31 Units Conversion Each parameter in MicroTran has one default unit, while the actual data can be in many other different units. When the program mtData is used to input data, the user has to know the units in advance. In the new GUI the user can input the data in his preferred actual units, for example, Metric or British, and the unit's conversion to the internal requirements will be done by a function defined in the data filter program: float stdunit (float value, char unit), according to the default unit defined in MicroTran. float stdunit (float value, char unit) /* Transfer data into default unit */ { if(unit=='G') value =value*1e9'; else if(unit=='M') value=value*le6; . else if(unit= = 'k') value=value*le3; else if(unit=='m') value=value*le-3; else if(unit= = 'u') value=value*le-6; else if(unit~='p') value=value*le-9; else if(unit= = 'n') value=value*le-12; else value=value; return value; /* Return transferred data */ } For example, the default unit of those parameters related with time is second (s). But the user can input the data in milliseconds, microseconds, or any other reasonable unit, then call the function stdunitQ to transfer the data to in units of seconds. 32 Special attention is given to the inductance and capacitance. Since the default units for them are "mH" and "uF" respectively, after calling the function stdunitQ, extra steps are taken to complete the data unit transfer. Check Data Characters In MicroTran the data input format is indicated in F O R T R A N - 7 7 notation, each parameter has strictly defined format, and the user has to follow it strictly to be able to run the program. If the user does not pay enough attention to this point, he may get wrong results or may even not be able to run the program. For example, for the transmission line component in the traditional format, parameter " C " has at most 6 characters. Since the default unit of it is a very small unit "uF", after the real data is transferred it probably will have more than 6 characters. Only when the data is truncated to be within 6 characters MicroTran can run. This truncation is done internally when the data is written unto the MicroTran input data file by the function: void getparameter (char stringf], int times). Pre-Processing For some components, e.g., piecewise and nonlinear elements, i f the user wants to prepare the input data file by using the program mtData included in the MicroTran package, he needs to do some pre-calculations by hand, which is not convenient when the user does not know the characteristics of these elements very well. ) In this new GUI, the user only needs to input the data pair of each point, and the data filter program will take care of the pre-calculation. 33 For each element there are different rules for pre-calculation. Totally there are 5 functions defined related with pre-calculation: void nlresistQ - For nonlinear resistance void nlinduct() - For nonlinear inductance voidpwlr() - For piecewise linear resistance voidpwliQ - For piecewise linear inductance void piecesrcQ — For piecewise linear composite function of source Placement of Special Elements Most elements can be placed easily into the correct section of the input data file according to their characteristics, but it is not so easy for piecewise linear resistance, since they may be placed in two different sections. With the new GUI, the user just needs to input the data pairs of current and voltage (z',v) point by point, but additional considerations must be made in the data filter program. If the current of the first point is non-zero, the resistance calculated from this point should be placed in section 3 "LINEAR A N D N O N L I N E A R B R A N C H E S " . Then all the data pairs are treated again and the results are placed in section 4 "SWITCHES A N D PIECEWISE LINEAR COMPONENTS". 2.4 DATA MODIFICATION AND SIMULATION In the main-panel three optional command buttons - "MODIFY", " R U N " and "PLOT" are designed to help the user control the simulation process. 34 These commands are implemented separately by the following functions: • "MODIFY" - system ("mtdproject2. dat") • " R U N " - system ("mt project2. dat project2. out project2.plo ".) • "PLOT" - system ("mtplot project2.plo ") Commands "mtd.exe", "mt.exe" and "mtplot.exe" are executable programs included in the MicroTran package. The function: int system (const char ^command) invokes the DOS C O M M A N D . C O M file to execute a DOS command, a batch file, or any other program named by the string command from inside an executing C program. To be located and executed, the program must be in the current directory or in one of the directories listed in the P A T H string in the environment. The function returns 0 i f the command processor is successfully started or -1 i f an error occurs.1101 2.5 SUMMARY As it is well known, MicroTran is a very powerful program for power system transient analysis as well as steady-state analysis. But the strict requirements of input data format hinder its application especially when the user is not very familiar with the components or with computers. This GUI design and data filter implementation project has tried to help the user utilize MicroTran more efficiently. Several main features "are: • The new data input cards are comparably more user-friendly than the program mtData. The user does not need to take care of strictly defined formats, he can input data easily by following the simple instructions in the interface. 35 A data validation engine, which is very useful for transient studies, has been implemented for balanced overhead transmission lines. Validation for other components will be realized by following this example. A data filter program is independently responsible for transferring data to the requires format internally so as to save the user from too many detailed considerations in creating the input data file, so that he can pay more attention to the simulation results analysis. 36 C H A P T E R 3 A U T O M A T I C SECTION L E N G T H S E L E C T I O N F O R T H E Z - L I N E M O D E L 3.1 REVIEW OF TRANSMISSION LINE MODELS [ 3 ] Basic Theory Since the beginning of electric power application, overhead lines have constituted the most important component for transmission and distribution of electric power. Accordingly, in power system simulation studies, many models have been developed trying to simulate transmission lines as accurately as possible. One of the main difficulties in transmission line modeling for transients analysis is the frequency-dependence of the line parameters combined with the distributed nature of these parameters. The travelling wave equations in the frequency-domain are given by: d2V dx2 d2I = {ZY)V (1) 2 = (XZ)I (2) dx1 Where (ZY) and (YZ) are full matrices that couple the propagation of voltage and current waves in all phases. From the solution of the wave equations, exact hyperbolic equations are obtained as: Vk = Kn cosh(y) + ZJm sinh(^) V Jk=Y smh(^) + /„, cosh(^) 37 Where y - Propagation constant. - Surge impedance. Models Development A line model can be derived from the line hyperbolic equations to represent the entire line length. However, since the circuit parameters of this model are functions of frequency, this circuit cannot be used directly in time-domain simulations. Several other models have also been developed directly from the wave propagation considerations, such as the constant parameter model (CP - Line model), the nominal model, and the frequency dependent models: FD - Line model and FQ - Line model. Since most transient studies have a wide frequency range in the area around the transient, the FD - Line model is the preferred choice for these simulations. However, for strongly asymmetrical coupling cases, the Q constant assumption in the FD - Line model may produce a relatively large error. The recently developed Z - Line model is especially useful to deal with this situation. 3.2 THE Z - LINE M O D E L [ 1 6 ] [ 1 7 ] The Z - Line model was developed by Dr. Fernando Castellanos in his Ph.D. program at the University of British Columbia. This model is based on space discretization. The series impedance matrix [Z] is a full matrix With elements: 38 ZIJ=Ru+ja>(^L0+^) where Ry - Resistance of the conductor and the effect of ground return for the self terms when i = j , and effect of ground return for the mutual terms when i * j . ALy - Inductance due to the internal flux inside the conductors and in the ground return. Lexl - Inductance due to the external flux outside the conductors and outside the ground. Matrix [Z] can then be rewritten as [Z] = [Z"'sx] + Jo)[Lexl] = [Z" m ] + [Zexl] with Z;r = Ru+JcoAL„. The separation of basic effects in the Z - Line model is shown in Figure 3.1 [ 1 6 ] . Corrections for losses and internal flux Ideal line, only external flux A A / V A / v Y - A / V V [Zloss(w)] > [Le x ,][C] Fig. 3.1 Separation of Basic Effects in the Z - Line Model Assuming the shunt conductance of the overhead conductors G « 0 , the shunt admittance matrix [Y] can be written as 39 [Y] = jco[C], [C] = [/>]-'. Where [P] - Maxwell coefficients matrix which up to a frequency of 1MHz may be assumed to depend only on the system geometry. Then the full matrix product (ZY) in the line propagation equation (1) can be expressed into two parts: (ZY) = ( [ Z t a ] + ; C 1 ) ' M C ] = MZ'-WC) - co2[L-'][C] where [Z / o v s ] - Frequency dependent [z'""(ft>)] due to the skin effect. [ Lexl ], [C] - Constant and frequency independent. Based on this analysis, the Z - Line model separates the characteristics of wave propagation into two parts: • Constant ideal wave propagation at the speed of light due to the external electromagnetic field [ Lexl ] and capacitance [C]; • Frequency-dependent wave distortion due to the resistance and internal inductance of the line conductors and ground [z'"sv(6;)]. In this way, this model provides two main advantages over other existed models: • It considers a full frequency-dependent line parameter representation, so allows for an exact representation of strongly asymmetrical configurations. • It is formulated directly in phase coordinates, so that the time simulation can be done in phase domain directly, and transformation matrices connecting modal and phase domain used in traditional models are not necessary any more. 40 In order to use the Z - Line model to simulate any configurations of transmission line systems, two issues have to be solved first: • Develop a general fitting procedure to get the full frequency-dependent line parameter • Find a general relationship between the maximum section length and the highest frequency of interest. The solutions of these two issues, as developed in this thesis, are explained in detail next. 3.3 PARAMETER FITTING PROCEDURE In order to get the full frequency-dependent representation of the [Z'" s s matrix, each element of [Z'"ss(a>y\ must be evaluated for a wide range of frequencies. A number of improvements to the method originally proposed by Dr. Fernando Castellanos were developed in this thesis. The implemented procedure is as follows. corresponds to a parallel R-L block in the continuous time domain. Then each element of [z'"vv(<y)] is expressed as a sum of several of these blocks.' 1 6 1 The objective of the fitting procedure is to obtain the resistance rk and inductance lk at the frequency which is the pole of each first order block. The number of fitting blocks depends on the highest frequency of interest in the transient studies. The larger the highest frequency, the more fitting blocks are needed. By experience, the average number of blocks needed for a close fit is about one block per decade of frequency. sK (s = ja>) is taken as the basic fitting block, which The first order function s + p 41 A common set of poles is assumed for all the elements of the [Z ""(&>)] matrix. This reduces the calculation time during the time-domain simulation considerably. After trying a number of combinations, a set of frequencies was fixed at {0.000001, 6.0, 60.0, 500.0, 4000.0, 30000.0, 200000.0, 1000000.0} Hz, the value 0.000001Hz is used to get the approximate value of the DC resistance. 3.3.1 Line Constants Program'51 The Line Constants Program is used to obtain the frequency dependent line parameters. Three steps are involved. Step 1 Prepare Input Data The required input is the total number of conductors, the total number of phases, the maximum frequency, the ground resistivity and all the information on line geometry. Step 2 Run Line Constants Program to Produce the Data for Fitting The Line Constants Program is run to get the constant capacitance matrix [C] and the series impedance matrices [Z] or [ZE] at the chosen frequency range. For the case of one conductor per phase, we ask for the series impedance matrix [Z] of the unreduced system. For the case of more than one conductor per phase, which means that the conductors are electrically connected, we ask for the series impedance matrix [ZE ] of the reduced system of equivalent phase conductors, after elimination of ground wires and bundling of subconductors. 42 Since in the ideal line segment of the Z - Line model all modes travel at the speed of light a « 3 . 0 * 1 0 5 ^ ^ in the medium for air, the external electromagnetic field [Lexl] and i capacitance [C] satisfy the relationship a[l] = ([Lex' ][C]) 2 . From this relationship, after the constant capacitance matrix [C] is obtained, [^"'] can be calculated directly from the formula = -\[C]']. 1 J a Step 3 Run the Fitting Program to Get Fitted Data rk and lk Step 3 is subdivided into three steps again. 1) Determine the number of fitting blocks m. This determination is based on the highest frequency of interest in the transient study. As mentioned before, the larger the highest frequency, the more fitting blocks are needed. In our implementation the Nyquist frequency is taken as 5 times larger than the largest fitted frequency. This assures that the values obtained at the highest frequency in the transient will be accurate within 3% distortion error of the trapezoidal integration rule. An additional block is added corresponding to the DC series resistance RQ and the external inductance Lexl. This procedure is implemented as follows: if(fny< =500.0)blk = 3; /* blk = m */ else if (fny<4.0e3 ) blk = .5; /* From now on add the series block */ else if (fny<3.0e4 ) blk = 6; else if (fny<2.0e5 ) blk = 7; else blk = 8; 43 2) Subtract the influence of R0 and Lexl from the series impedance obtained at step 2. The subtraction is done for all frequency values except 0.000001 Hz. It is implemented in the program as: for (i=l; i<blk; i++) { ReqlfiJ = RfitfiJ - RfitfOJ; /* Subtract influence of R0 from resistance */ Xeql[i] = XfitfiJ - w[i]*Lext; /* Subtract influence of Lexl from reactance */ } From now on the fitting procedure concentrates on getting rk and lk, k = 1,2, •••,m, for the m cascaded parallel R-L blocks. 3) Fit rk and lk We have that In order to get rk and lk at one frequency, the values obtained in this step have to subtract the frequency dependent influences of rk and lk at the other frequencies. The fitting procedure begins from the values at the highest frequency, then goes back to the lower frequencies with the values of rk and lk obtained at higher frequencies until get 6.0Hz. The procedure is repeated many times until stable results are obtained, each time with the newest values of rk and lk at all the frequencies. From experiments, 100 repetition is enough to get stable results. 44 After obtaining rk and lk for the common set of frequencies, the full frequency-dependent line parameter representation [Z'"ss(a>)] at different frequencies can be obtained by using the formula (3). The fitting procedure implemented in the program is shown in Appendix 1. The results obtained with this fitting procedure are discussed in the second part of section 3.3.2. But before discussing these results we present the GUI developed to help the user carry out the fitting procedure. 3.3.2 GUI Design GUI Interface for the Z - Line Parameter Fitting Procedure The GUI shown in Figures 3.2 and 3.4 is designed to help the user obtain the fitted data rk and lk, k = 1,2,- • • ,m, for the Z - Line model. 1. GUI Description The GUI is divided into two parts. The left-hand side is used to input the information on the transmission line system, and the right-hand side is used to display the fitted data. In "Units Card", following the definition in the FD - Line model of MicroTran, "UNITS" has two options - METRIC and BRITISH, and "FORMAT" has two options too - U B C and BPA. In the "Conductor Data Cards", "Phase Number" is designed to increase or change to zero automatically according to the values of "Total Conductor Number" and "Total Phase Number" to help the user input the correct geometry information for each conductor. From design experience this is very helpful for large systems when many pieces of information 45 need to be input, since the user may get confused regarding which data has already been input and which has not. In our design, the phase number reminds the user which information to be input next. The function of each command is as follows: • "SaveData" - save the data of the line geometry of each conductor into the input data file according to the format defined in the FD - Line model. • "Reset" - set all the data to the default values for new case studies. • "Run" - launch the program int stepl_4 (void) to get the fitted data. Steps 2 and 3 in section 3.3.1 are implemented in this program. • "ShowResults" - display the results of the data fitting procedure. This step is executed automatically after the command "Run" is executed i f "AutoShowResults" is enabled, otherwise has to wait until the user clicks this command button. • "Quit" - quit the interface and stop the whole procedure. Considering the user's preference, two methods are designed for running this GUI: click the corresponding command button or select the command from a menu. 2. Usage Steps • Create the input data file. First the user inputs all the general information of the transmission line system on the left-hand panel of the GUI, which includes the total conductor number, total phase number, maximum frequency, ground resistivity and units card. Then every time after he inputs the data of the line geometry for each conductor, he clicks "SaveData" to save the data into the input data file "stepl .dat". 46 • Run the fitting program. After all the information has been input, a message window titled "Step 1" will popup to tell user that he can now run the FD - Line module of MicroTran to get the constant capacitance matrix [C] and the series impedance matrices [Z] or [Zh:]. The user only needs to click "Run" to get the fitted data rk and lk. Several message windows will popup during the fitting procedure to tell user which step he is currently at. • Look at the fitting results. For multiphase transmission line systems, there is more than one element to be fitted. The user can click "The fitted parameters o f to select which element to look at. GUI of Fitting Data Comparison The interface form shown in Figure 3.3 and Figure 3.5 is designed to compare the fitting results [Z'"sv(ft>)] with the original data. In this GUI the user inputs some required information first, which includes conductor number, phase number and ground resistivity. Then he selects the frequency set where to compare the fitted data and the original data. To be more flexible, for the same case he can select different frequency sets to do the comparison. After he clicks "Compare", the original data are obtained directly by running FD - Line model, and the fitted data at these selected frequencies are calculated by the formula (3) with the fitted parameters rk and lk, k = \,2,---,m, from the fitting procedure. At last, the comparison results are shown automatically i f "AutoShowResult" is 1 or by user clicking "Show" if not. The command button "Help" on the left bottom is used to tell the user the function of this program and the procedure for using it. 47 The fitted data and original data are compared for both magnitude and angle. Since the values of the diagonal and off-diagonal elements of the [Zloss(co)] matrix are in different ranges and the curves are of different shapes, the comparison results are shown in separate graphs. Diagonal elements are shown on the left side and off-diagonal elements are shown on the right side of the graphs. In all the four graphs of Figure 3.3 and Figure 3.5, solid-line curves represent the original data while dash-line curves represent the fitted data. Two typical cases are shown here. Case 1 is for a line with one conductor per phase: the fitting procedure is shown in Figure 3.2 and the fitting comparison is shown in Figure 3.3. Case 2 is for a line with two conductors per phase: the fitting procedure is shown in Figure 3.4 and the fitting comparison is shown in Figure 3.5. r:;n Original & Fitted Data of Transmission Line (c) Dai Nan 1999 File Help Original Data Total Conductor Number ; 3 Total Phase Number * Maximum Frequency F 2000.0 Ground Resistivity j C i co J Units Card:| UNITS i METRIC • ! F O R M A T UBC j r j Conductor Data Cards : Phase Number! 0 3 j Diameter Skin Correction 0.2356 ! Horizontal Resistance j 10.09950 j Vertical He ight ; * 1 0.0000 Midspan j 1 0.0000 I Fitted Data The fitted parameters of j z\W] j_ D C Resistance 11 1 i r . 1  ifJoE^Ol Resistance ! 11 1 80174 E-02 ' ' ji'.l 51 936E :01 I1.013007E+00 I 6.035911E+00 • 3.211349E+01 . , 2 786712E+02 IflfO^-O C o 0000 Type t A React % 0.00000 SaveData j Beset Run Inductance 2.778136E-04 • 2.187015E-04 2.107795E-04 1 651609E-04 1.128374E-04 7.760942E-05 I i Ext. Inductance f~ Auto ' ShowResults S h o w R e s u l t s J Qtiit Fig. 3.2 GUI for Parameter Fitting Procedure - Case 1 48 gs Comparison of [Zorg] and [ZNt] P h a s e Number , 3 ConrJ. Number Z ! Ground R e s i s . $10 Freq , Number i*12 Freq. Compared 0.001 1 0 01 J ' A d d Freq . _i I _ = 1E+4-s 1E+2-ts 'e 1E*0-cn a •2 1F-?---Z[1j[1) 1E-5 Auto A d d / D e l e t e Add I Qelete i 1.6-i Compare [ Resul t ' Both • j Component ' ![-]['] ^ 1 7 shotrf?B«uit Show j S 1.2": 2 '•3 0 * • 0.8-I N as "I 0.4-Help Quit 0.0-1E-5 1E*0 TE+5 F~r©c |UGncy £HzJ 1E*0 1E+5 1E+1IJ f \ j 1 \ J 1E+10 1E+6 E W E 1E+3-x: O rsi 1E-0-0) TO 3 'c 1E-3-cn a 1E-6-- 2E2J[1] --zram ^ y • s y 1E-5 1.6-r in c 1.2-0 T3 a w 0.B-N 0) AngI 0.4-0.0-i 1E-5 1E-0 1E+5 Frequency (Hz) \ 1E+0 1E+5 Frequency (Hz) 1E+10) 1E-10! Fig. 3.3 GUI for Fitting Data Comparison - Case 1 aft Original & Fitted Data of Transmission Line (c) Dai Nan 1999 File Help Original Data Total Conductor Number! * 8 Total Phase Number Maximum Frequency Ground Resistivity Units Card:] U N I T S j METRIC f o r m a t ] U B C T | Conductor Data Cards:! 3 - 1 2 0 0 0 . 0 •1OO.O Phase Number] ~ 0 Skin Correction l = 0 5000 Resistance =11.62160 4A Diameter J 39 ,60440 Horizontal j 3 3 9319 Vertical Height | 3 30.0230 Midspan | 10.0000 SaveData Beset Bun Fitted Data J The fitted parameters of ; Z|3] DC Resistance! [T'o^bliOOEflF"' 3] • ) Re^isjance___J 1 340180E-02 1.781335E-01 3.789817E-01 3.553216E+00 2.277114E+01 2.141758E+02 Inductance 3 104689E-04 4.718487E-04 7670570E-05 8.857873E-05 7.451971 E-05 5 703671E-05 f ^Jnduc tenceJ 1 112100E-03 r— AutO 1 ShowResulU SJiowResults j Quit | Fig. 3.4 GUI for Parameter Fitting Procedure - Case 2 49 I Comparison of [Zorg] and [7ht] I B B mm P h a s e Number t Cond . Number ! 3 8 Ground R e s i s . C 100.0 1E+6-1E<4-f-req Number „ i ; Fraq . Compared 100000. • 1000000. 10000000. , 10000000. I £ E o N1E+2-'1 1E+0-v a 3 1E-2-1 1E-5 1E+6 1E+3--Ze[1][1] - ZeiHH] E O N 1E+0 a) •o 1E-3 c 2 »2S 1E+0 1E+5 Frequency (Hz) 1E+10 1E-5 1E+0 1E+5 Frequency (Hz) 1E+10I Add/De fe te Add I Delete I Compare [ Result ! Both • ] Component; Z|3](i] • * Shotdtsuft S h o w ) Help I Quit I 1.6-c 1.2-•o 0 M a c?0.4-0.0-/ / \ \ 1.S' % 1 S •5 a N "5 1E-5 1E+Q 1E+5 Frequency (Hz) 0.0' V \ \ \ \ lE+m 1E-5 1E+0 1E+5 Frequency (Hz} Fig. 3.5 GUI for Fitting Data Comparison - Case 2 According to the format of "Conductor Data Cards" in the F D - Line model, phase numbers for conductors must follow the sequence [Z/,MV(<*>)] with no missing phases, then followed by ground wires expressed as 0. rk For case 1 the total phase number equals the total conductor number, so there are no ground wires, and in Figure 3.2 "Phase Number" 3 means the entered data is for the last phase. For case 2 there are two ground wires, and in Figure 3.4 "Phase Number" 0 means the entered data is for the ground wires. From Figure 3.3 and Figure 3.5 for the diagonal elements of the [Zhss(<o)"[ matrix we observe that the fitted curves match the original data perfectly from very low frequency up to 1 M H z in both magnitude and angle, while for off-diagonal elements they also match quite well, especially in magnitude. These results prove that the idea of fixing the common set of poles for the approximation of all elements in the matrix is practical and the chosen fixed 50 frequency set is good enough to get the accurate full frequency-dependent line parameter representation. From theoretical analysis, if the highest frequency in the fixed frequency set is raised to a higher value, the fitted data can match correspondingly to a higher frequency. Since 1 MHz is already much higher that the highest frequency usually used in transient studies, it is not necessary to go higher than this frequency and save computation time. 3.4 NUMBER OF SECTIONS PER LINE LENGTH 3.4.1 Reason for Line Sectionalization In the Z - Line model the losses [Zloss(o))] are dealt with as lumped instead of distributed. This is only correct for a given frequency when the section length is small compared with the total line length. In other words, this model can only be accurate within a certain error margin for a given section length. In order to get accurate results with the Z - Line model, the total transmission line has to be divided into many short segments. Each segment is then connected in cascade. In each segment, as shown in Figure 3.6, the lumped [Zhs\co)] is divided into two halves with each half added at the ends of the distributed ideal line segment.[16] As frequency increases, the internal resistance will increase dramatically, and even though the internal inductance decreases, the product coLmiemal will also increase. The effect is that the magnitude of the [Z'"ss(co)] matrix will increase. Therefore, as frequency increases, the effect of representing [Z'"ss(co)} as lumped will increase the error in the model. A general 51 relationship between the maximum section length and the highest frequency is expected to express the number of required line segments in term of / and co, independently from any particular test condition. [Z loss(w)]/2 (Correction for losses and internal flux) [L e x t ] and [C] (Ideal flux) [Z l oss(w)]/2 (Correction for losses and internal flux) Fig . 3.6 P roposed L ine-Sect ion for Z - Line Mode l 3.4.2 Method of Analysis A single diagram as shown in Figure 3.7 can be used to represent any transmission line in . This is called the general circuit constants (GCC) terms of a matrix of Coefficients A B C D matrix of the lien and it reflects the relationship between the voltages and currents at the sending and receiving ends of the line. Fig . 3.7 Diagram of Transmiss ion Line From theoretical analysis, the same GCC matrix should be obtained no matter which model is used to simulate the line system. In the case of the Z - Line model the relationship to determine the number of sections can be realized by comparing the approximating GCC 52 matrix for the cascaded sections of the Z - Line model (a) with the original GCC matrix for the exact IT model of the full line length (b). 1 \zlossi 2 0 1 coshOy) Z c 0sinh(> 0/) 7 c Osinh(/ 0/) cosh(>0/) 1 - Z ' " s 7 2 0 1 cosh(^) Zc. sinh(^/) Yc sinh(^) cosh(^f) (a) (b) Where / - Section length. y0 ,y - Propagation constant matrix of the ideal line and original line, respectively. Z c 0 , Z c - Surge impedance matrix of the ideal line and original line, respectively. Yc0, Yc - Inverse matrix of ZcQ and Zc, respectively. After obtaining [Z'"xs(co)] at a given frequency, the elements of matrix (a) should be close enough to the corresponding elements of matrix (b) for a given section length. Since for multiphase transmission line systems all the elements of the (a) and (b) matrices are sub-matrices, complicated calculations of hyperbolic functions are involved and it is impossible to get the values of the hyperbolic functions directly. To overcome this problem, a method of iterative analysis together with eigenvalue and eigenvector analysis is used in the comparison. 1. Iterative Analysis Method1 1 The iterative method is an important mathematical tool for a variety of applications in physics, engineering, and computer science. 53 Iteration is the repeated application of the same function given an initial value. The simplest iterative method has the form XM = X' - T(AX' - b),l = 0,1,-••, where X° is the given initial guess and x is a parameter. Under certain conditions, the sequence { X1} converges to the solution of AX = b.By its nature, an iterative procedure does not accumulate rounding errors in the same way as a direct method. Nevertheless, the accuracy of the iterative solution will be affected by the conditioning of A . One advantage of the iterative method is its simplicity where only matrix-vector multiplications and vector additions are performed. The disadvantage is that the rate of convergence may be slow or even diverge. Assuming that the computed sequence of iterates { X ' } does approach the exact solution when / increases, a suitable convergence test has to be defined such that the final iterate X ' " approximates x with a given accuracy. For most cases a stop criteria is taken for stopping | | X - X " ' | | II I, the iterations as soon as —rr-r,— < e, where x - x'" is the norm of the difference between ||x|| the exact solution x and the current iteration x'". 2. Eigenvalue and Eigenvector Analysis Method t 3 ] As it is known, for a matrix A it is possible to find a matrix X so that X ~ X AX = A , where A is a diagonal matrix. Assuming X'] -A-X = A = 4 0 0 0 ^ 0 0 0 X, 5 4 Where ^ 4 - 3 x 3 matrix. Xi - Eigenvalues, got from the characteristic equation of A : \A-Al\ = 0. Xj - Eigenvectors. Then A-X = X-A,A = X-A-X~\ Now any function of A can be calculated by f[A} = X-f[A]-X~] =X-fW o 0. 0 / ( ^ ) 0 0 0 / ( ^ ) • x-Since each eigenvalue Ai is just a complex (possibly real) scalar, it is much easier to calculate /(A)) than to calculate the whole matrix f[A]. There are a number of techniques to find the eigenvalues and eigenvectors of a complex matrix. In some software packages there even are ready-made functions to help the user get the eigenvalues and eigenvectors of a matrix. For example, in Matlab (Math Laboratory) the function [V, D] = EIG (X) produces a diagonal matrix D of eigenvalues and a full matrix V whose columns are the corresponding eigenvectors so that X • V = V • D. 3.4.3 Preparation for A Relationship Determination Before programming an algorithm to find the general relationship for the number of sections of the Z - Line model, one ambiguity must be clarified and several considerations have to be taken. 55 Ambiguity: How to Distinguish the Propagation Constants yv and y, As mentioned in section 3.1, the exact line hyperbolic equations are obtained from the solution to the travelling wave equations, and the exact GCC matrix is obtained accordingly as: cosh(^) Zc sinh(^) Yc sinh(^/) cosh(^) where y - propagation constant. The propagation constant of voltage yv and that of current y, are calculated as yv - 4Z- Y and y, = 4Y-Z separately, where Z is the series impedance and Y is the shunt admittance of the transmission line. For multiphase transmission line systems, both Z and Y are matrices. Since matrix products do not satisfy the commutation property, in general yv ±yr Many books and papers emphasize this point at the very beginning, but finally they just use y to represent both yv and y, as shown in the above matrix. However, in order to get correct simulation results, yv and y, in the GCC matrix have to be distinguished. As mentioned in section 3.1, an exact IT circuit, as shown in Figure 3.8 (a), can be derived from the line hyperbolic equations to express the entire line length. Ik lm V k V m Fig. 3.8 (a) Exact TT Circuit This transmission line can also be expressed as two cascaded exact IT circuits, as shown in Figure 3.8 (b). By inference, this transmission line can be expressed as n cascaded exact IT circuits. 56 Ik inter Im Vk Y 2 inter V m Fig . 3.8 (b) C a s c a d e d Exact TT Circuit Where Z, = (27) sinh(^) 00 ' tanh(y JA) Y2 = (YI) / 2 , (r/2) , _ y smhjyj/,) Z , = ( Z / 2 ) (r/2) ' (r 74) Since the Hyperbolic equations are exact for any line length and any frequency, the GCC matrices obtained from one exact n circuit and n cascaded exact n circuits should be the same, namely. cosh(^/) Z c sinh(^) Yc sinh(^) cosh(yl) Where the left-hand side is obtained from one exact n circuit, and the right-hand side is obtained from n cascaded exact n circuits. Assuming n = 2: cosh(> l/n) Zc sinhO l/n Ycsinh(y/n) cosh( r j /) 'A B~ C D 57 • If y is calculated as either yv = y/ZY or y, = ^ YZ, the results are very different between each corresponding diagonal element of the A, B, C, D matrices. • If yv is used in matrices A and B and y, is used in matrices C and D, the results are still very different between the corresponding elements Vk = A-Vm+B-Im • Considering that in the line hyperbolic equations: _ , A and C are related with the voltage, while B and D are related with the current, so in the matrix A and C use yv, while B and D use y,. From tests the difference between each corresponding diagonal element is now negligible. When n is increased to a larger number, which means more exact n circuits of a shorter length are cascaded, the same result is obtained. Finally, the GCC matrix is expressed precisely with distinct yv and y, as: A B Q,osh(yvl) Zc sinh(x//) C D\ ~ [Yc sinhOv/) cosh(y,l) ' Hyperbolic functions can be calculated using a Taylor series: + 0 0 2/1-1 V — * X x 3 x 5 x 7 x 9 = X + 3! + 5! + 7! + 9! +••• = = 1 + x 4 x 6 f l 2! + 4! + 6! + 8! +••• = 1)! +oo In The accuracy of the results will depend on how the variables are defined in the program. For example, a real number can be defined either as double or float, double means 64 bits or 16 digits, and float means 32 bits or 5 digits. In Matlab, double and float are defined as long and short separately. In our case, in order to keep the results as accurate as possible, the numerical format is specified as format long. 58 Pre-Consideration for the Iterative Method According to the definition of iteration, the initial value, iteration function and stop criteria are three indispensable components of the iterative method. They have to be defined beforehand in order to use the method. 1. Select Initial Value The initial value is guessed based on the following considerations. • The nominal IT circuit can be used with reasonable accuracy for time-domain simulation 10000 , of overhead lines with length / < — if the line parameters are assumed constant.1 ' J max • The equivalent n circuit derived from the line hyperbolic equations can represent the entire line length L . • Since in the Z - Line model the frequency-dependent characteristic of the line parameters has been taken into account, the length lz is assumed to be within the range: 10000 I <lz < L , and / = — is taken as the first guess of initial value. J max 2. Determine the Iteration Function The required Z - Line section relationship is determined by comparing the GCC matrix obtained from the exact model and the Z - Line model. For any given frequency, only within certain length ranges can these two matrices be close enough. Since for multiphase transmission line systems all the A, B, C , D elements are sub-matrices, the comparison will be done with A, B, C, and D, one by one. And for the complex numbers, the 59 comparison can be done with regards to real, imaginary and complex modulus (magnitude) parts, separately. For (yi) -» 0, a nominal n circuit can be used to approximate the exact n circuit, where Z, « Z • / = R(co) + jcoL(co), 72 « y • / = jcoC. Then the GCC matrix becomes: A B C D 1 + [R(co) + jcoL(co)] • jcoC . [R(co) + jcoL(co)]-j(oC^ jcoC-[\ + ] 1 + R(co) + jcoL(co) , jcoC-[R(co) + jcoL(co)] 1 R(co) + jcoL(co) jcoC 1 It can be found that B is the most sensitive element to frequency. And within B, the real part R{co) is more sensitive than the imaginary part L{co). Several cases were tried by comparing all the A, B, C , and D elements in real, imaginary and magnitude parts. Since the diagonal elements are more important than the off-diagonal elements, only diagonal elements are used in the initial comparisons. For the same frequency, the difference between the real part of B always increases faster with the section length than the difference between any other element or any other part. This also proves that the real part of B is more sensitive than the other parts. Finally the iteration function is determined to be the comparison of the real part of the corresponding diagonal elements of matrix B obtained from the exact model and the Z -Line model. In order to avoid the difference of magnitude order introduced by different frequencies, the comparison is expressed quantitatively by the average relative error of the difference. 3. Define the Stop Criteria 60 A stop criterion has to be clearly defined before using an iterative method. After assuming 5% as an acceptable error, the stop criteria for our problem is defined as: — > *100 < 5 Where m - The total phase number. Rexacl - The real part of element of matrix B from the exact model. Rz (/,/) - The real part of element (/,/') of matrix B from the Z - Line model. Inexact O V ) ~ -^zO>0| - The norm of difference between the two elements. 4. Case Studies After the iteration function and stop criterion are defined, a large range of section lengths was tested for two transmission line systems are shown in Figure 3.9 (Case 2 is highly asymmetrical). (a) C a s e 1 (b) C a s e 2 Fig . 3.9 Line Configurat ion of C a s e Stud ies 61 These two totally different systems are taken to make sure that the obtained relationship between the section length and the highest frequency is independent from any particular test conditions. The curves of section length vs. average relative error for case 1 at / m a x = 8000Hz and case 2 at / m a x = 10007/z are shown in Figures 3.10 and 3.11 separately, where the solid line represents the actual curve and the dash line represents the fixed 5% average relative error to help find the maximum section length when the average relative error is less than 5%. Both figures are obtained at ground resistivity p = 100Q - meter . gi Relationship Between Sect ion Length and Average Relative Enor BH3EI 0.00 0.25 0.50 0.75 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 3.00 3.25 3.50 S e c t i o n Length (km) SGetData Q u i t Fig. 3.10 Section Length Relationship Curve for Case 1 - fmax = 8000Hz The results of this test indicate that both cases have similar section length relationship curves at 1000.0, 4000.0 and 8000.0Hz. From these curves the solid line and the dash line join at ' . , . , , , 10000 quite high values, almost two times as — . In order to save valuable computation time, J max , 10000 10000 the initial value is increased from — to 1.5 * J m L 62 Relationship Between Sect ion Length and Average Relative Enor 10.00-9 00-i ? 8.00-) 0 7.00-UJ 8.00-> 5.00--1 4.00-3.00 " cu ! j j> 2 . 0 0 - 1 1.00-0 . 0 0 - 7 — 0.00 2.50 5 .00 7.50 1 0 . 0 0 1 2 . 5 0 1 5 . 0 0 1 7 . 5 0 2 0 . 0 0 2 2 . 5 0 25.001 Sec t ion Length (km) IGetDatai Quit Fig. 3.11 Section Length Relationship Curve for Case 2 - / m a x = 1000Hz 3.4.4 Implementation Procedure Step 1 Prepare Data for Iteration Procedure Get needed data from the output data file "FitData.dat" from the fitting procedure, which includes total phase number, highest frequency, fitting block number and fitted data rk and lk. Then calculate the approximation parameters at the highest frequency. This calculation is implemented in the program as: . /* Use Z(co,) = R(co,) + jX{co,) = Y [ K K " r K / + j " " r K —] to calculate the approximated parameters at the highest frequency. */ for i=l:phase, for j=l .phase, Rloss(i,j)=R0(i,j); Xloss(i,j)=0.0; 63 fork=l:blk, /* coefl and square are two variables defined to save internal values */ coefl=w*L((i-l) *phase+j,k); square=(R((i-1) *phase k) A2)+(coefl *2); Rloss(i,j)=Rloss(i,j)+R((i-l) *phase+j,k) *(coeflA2)/square; Xloss(iJ) =Xloss(i,j)+(R((i-l) *phase +j, k) A2) * coefl/square; end end end Step 2 Perform the Iterative Procedure First calculate the propagation constant of voltage, propagation constant of current and surge impedance of the original line and ideal line segment in order to be able to express precisely the GCC matrices for both line models with distinguished yv and y,. Then perform the 10000 iterative procedure by using a "for" loop with initial length of 1.5*— until the defined max stop criterion is met. This is implemented in the program as: Rvl =sqrtm(Ztotal*Y); /* propagation constant of voltage of original line */ Ril=sqrtm(Y*Ztotal); /* propagation constant of current of original line */ Zcl =sqrtm(Ztotal/Y); /* Surge impedance of original line */ Ycl=inv(Zcl); 64 Rv2 =sqrtm (Zext * Y); Ri2=sqrtm(Y*Zext); Zc2=sqrtm (Zext/Y) ; Yc2=inv(Zc2); /'* propagation constant of voltage of ideal line */ /* propagation constant of current of ideal line */ /* Surge impedance of ideal line */ /* For loop to realize the iterative procedure */ for i=1:5000, len=coefa+coefb*i; /* initial length coefa=1.5*10000/fmax */ [VI,Dl J=eig(Rvl Hen); /* Get eigenvalues and eigenvectors of exact model */ [V2,D2]=eig(Ril Hen); RlA=coshRvl; RlB=Zcl *sinhRil; RlC=Ycl*sinhRvl; RlD=coshRil; /* get GCC matrix of exact model */ [V3,D3]=eig(Rv2*len); [V4,D4]=eig(Ri2*len); /* Get eigenvalues and eigenvectors of Z model */ R2A =coshRv2; R2B=Zc2*sinhRi2; R2C=Yc2*sinhRv2; R2D=coshRi2; 65 g2=[R2A R2B; R2C R2DJ; /* For ideal line segment */ mtloss=[eye(phase) Zloss *len/2; zero(phase) eye(phase)] /* For loss part */ gcc=mtloss *g2 *mtloss; /* get GCC matrix of Z JLine model V avr=0; /* Calculate relative average error */ for j=Lphase, avr=avr+abs((real(RlB(j,j))-real(gcc(j,j+phase)))/real(RlB(j,j))); end avr=avr/phase *100; if(avr>5) /* Check stop criterion */ index=i-l; break; end end length=coefa+coefb*index; /* Get section length */ Step 3 Save Results of Iterative Procedure Save the section length and other related data, such as the approximated parameters at the highest frequency, the propagation constants and surge impedance of the ideal line segment, into the data file "length.dat", so that these parameters can be used later by the simulation programs. 66 3.4.5 Maximum Section Length Results In order to find the general relationship between the maximum section length and the highest frequency of interest independently from any particular test conditions, the two transmission line systems shown in Figure 3.9 and two other real cases were tested at different highest frequency fmm and ground resistivity p. The line configurations of these two real cases are shown in Figure 3.12, case 3 is "BPA'S 500KV, 174-MILE, C O U L E E - R A V E R D O U B L E CIRCUIT LINE", case 4 is "JOHN D A Y -LOWER M O U N M E N T A L LINE (222 Km)". o 19 O 20 8 10 ¥ ^ 12 11 6 4 5 13 X ^ - 1 5 14 2 16 ¥g 18 17 o 7 1 2 O 8 5 6 (a) C a s e 3 (b) C a s e 4 F ig . 3.12 Line Configurat ion of Rea l C a s e s The results for the maximum section length are listed in Table 3.1. From the results in Table 3.1, several conclusions can be reached. 67 Table 3.1 Maximum Section Length (km) (for 5% error) Case 1 Case 2 Case 3 Case 4 Ave. Length A a x =500,^=100 40.06 36.80 39.73 42.35 39.735 / m a x =500,/? = 200 39.08 35.67 38.95 41.74 38.860 A a x = 1000,/?= 100 20.49 18.88 20.36 21.55 20.320 / m a x = 1000,/? = 200 19.96 18.26 19.92 21.22 19.840 fm = 4000,/?= 100 5.345 4.977 5.283 5.534 5.2848 / m a x = 4000,/? = 200 5.203 4.800 5.158 5.436 5.1492 / m a x = 8000, /? = 100 2.747 2.582 2.713 2.822 2.7160 / m a x = 8000,/? = 200 2.676 2.489 2.646 2.769 2.6450 / m a x = 10000,/? =100 2.216 2.090 2.189 2.272 2.1918 / m a x = 10000,/? = 200 2.159 2.015 2.136 2.229 2.1348 / m a x = 12000,/?= 100 1.858 . 1.756 1.836 1.902 1.8380 / m a x = 12000,/? = 200 1.811 1.694 1.791 1.866 1.7905 (Note: the units of / m a x is Hz, the units of p is Q - meter.) • The section length depends greatly on the highest frequency / m a x and is basically independent from any particular test conditions including the line configuration and ground resistivity. • Whatever the line configuration, the average section length at p = 100Q - meter is always slightly larger (about 2.5%) than that at p = 200Q - meter given the same highest frequency. • The maximum section length of the Z - Line model is about 2 times that obtained for the nominal IT model when the line parameters are assumed constant. Similar to the nominal IT model, the general relationship between the maximum section length and the highest frequency for the Z - Line model can be expressed as a function of the frequency, which . , . . , 20000 m this case is / < — . 68 These results can be compared with the "Figure 3.8 Z - Line maximum section length vs. maximum frequency of interest"1161 provided by Dr. Castellanos with his model. Our results, using a more detailed analysis, give section lengths of about two times those obtained by Dr. Castellanos. 10 10 a 1 CD Pi o •7-1 CD GO 10 10 10 • o oo ' O ' from more detailed analysis ° from Dr. Castellanos 10 10 10 10 10 10 Frequency (Hz) Figure 3.8 Z-line maximum section length vs. maximum frequency of interest 3.4.6 Cascade Effect Analysis As discussed above, the Z - Line model is only accurate within limited line length and, therefore, the total transmission line, which is usually much longer than the limit section length, has to be divided into many sections. The larger the highest frequency, the shorter each limit section is, and the more sections are needed. 69 From theoretical analysis, the GCC matrix obtained from n cascaded Z - Line model sections should be identical to that obtained from one exact model with the entire line length. In order to check the effect of cascaded connection on the general relationship obtained for the Z - Line model, the two real cases of transmission lines discussed earlier were used again at several highest frequencies. The entire line length is 174mile for case3 and 222km for case 4. The ground resistivity is p = 200Q - meter for case 3 and p = 100Q - meter for case 4. The average relative error after cascading is shown in Table 3.2. Table 3.2 Average Relative Error after Cascaded Connection Average Relative Error (%) Case Studies Case 3 Case 4 Highest Frequency (Hz) f = 500 J max 2.0052 1.4565 f = 1000 J max 7.9626 2.8433 /max = 4000 4.5449 1.7910 /max = 10000 7.8394 11.0835 From the results in Table 3.2, we can see that for most situations the average relative error is within 10%. These results prove that the general relationship obtained for the Z - Line 20000 model / < — is correct. J max 3.5 CONCLUSION In this chapter, two problems that are critical for using Z - Line model were studied. • A general fitting procedure with a user-friendly GUI was developed to help the user obtain the full frequency-dependent line parameter representation [Z'"ss (co)]. 70 After the user provides the configuration of the transmission line system, he only needs to follow simple instructions on the GUI to get the fitted data directly. The general relationship between the maximum section length of the Z - Line model 20000 segments and the highest frequency was obtained as / < — . J max This relationship was also tested under the condition of cascaded connections. The relationship gives user a general idea of how many sections are needed for simulation. Then he can start from this point to get the best simulation results. 71 C H A P T E R 4 F U T U R E W O R K There is much work still to be done on power system transients simulation to improve existing simulation tools such as MicroTran, or to build new simulation models for circuit components such as the Z transmission line model. For Statistical Analysis of Switching Surges during Energization • The software realization of statistical data analysis using MicroTran was only applied to a very simple case. A more comprehensive package could be build to include more complicated situations. For GUI Design and the Data Filter Implementation • The new data input cards are designed with many detailed items in order to deal with the most complicated power systems. A simpler version could be designed which would include only those most often used components for the entry-level users. • At present stage, user can input data from the new GUI, then generate the input data file in the required format by calling the data filter program. It would also be preferred that when the user wants to modify the data file, the corresponding GUI would popup automatically. This would not be too difficult to realize, since each element in the data file has a keyword to indicate itself. After the keyword is found, the corresponding child-and grandchild-panel can be found and displayed easily. 72 For the Z - Line Model • The general relationship between the maximum section length and the highest frequency of interest was obtained and tested with cascaded connections, and the results in Table 3.2 prove that the obtained relationship is basically correct. This relationship is derived from comparing the GCC matrices from both models, other methods may be tried to get a more accurate relationship. • In this report only two issues of using the Z - Line model are solved. After solving these critical problems, the Z - Line model has to be implemented into simulation tools such as MicroTran or OVNI. 73 C H A P T E R 5 CONCLUSIONS Three developments on power system simulation are presented in this report. The first two are targeted at simplifying and therefore extending the application of the existing simulation tool MicroTran, and the other one is targeted at helping the implementation of the newest transmission line model - the Z - Line model. The first development was the software realization of statistical data analysis that automatically generates a large amount of random samples without user intervention. The second development was the design and implementation of a GUI and data filter for creating input data files. With these new interfaces, the user is no longer constrained by the strict data formats and pre-calculations. A data validation engine was implemented for balanced overhead transmission line parameters. The third development was solving two critical problems of the Z - Line model implementation so that the model can be applied to any transmission line systems. One was developing a general fitting procedure with a user-friendly GUI to get the full frequency-dependent line parameter representation [z'"'Vi(&>)]. A reference set of frequencies was fixed as {0.000001, 6.0, 60.0, 500.0, 4000.0, 30000.0, 200000.0, 1000000.0} Hz to use for the approximation of all the elements of the matrix. The other development was finding the general relationship between the maximum section length and the highest frequency of 20000 interest as / < — to give the user a general idea of how many sections are needed for an J max accurate simulation. 74 B I B L I O G R A P H Y I] H. W. Dommel, EMTP Theory Book, Second Edition. MicroTran Power Systems Analysis Corporation. Vancouver, B. C , Canada, May 1992. 2] Course Note: E L E C 553 - Advanced Power System Analysis. University of British Columbia. Vancouver, B. C , Canada, January 1998. 3] Course Note: E L E C 560 - Network Analysis and Simulation. University of British Columbia. Vancouver, B. C , Canada, September 1997. 4] MicroTran Reference Manual. MicroTran Power System Analysis Corporation. Vancouver. B. C. Canada, August 1997. 5] fdline Reference Manual. MicroTran Power System Analysis Corporation. Vancouver, B. C , Canada, August 1997. 6] Berman, Simeon M , Mathematical statistics: an introduction based on the normal distribution. Scranton: Intext Educational Publishers, 1971. 7] Cramer, Harald, Random variables and probability distributions. London: Cambridge University Press, 1970. 8] LabWindows/CVI Instrument Drive Developers Guide, July 1996 Edition. National Instruments Corporation. 9] LabWindows/CVI User Interface Reference Manual, July 1996 Edition. National Instruments Corporation. 10] Borland C++ Version 3.1 Library Reference. Borland International Inc. USA. II] M . B. Selak, J. R. Marti and H. W. Dommel, "Database of Power System Parameters for Data Validation in EMTP Studies: Overhead Transmission Line Application". 3rd 75 International Conference on Power Systems Transients, IPST'99, Budapest. June 20-24, 1999. [12] J. R. Marti, B. W. Garrett, H . W. Dommel and L. M . Wedepohl, "Transients Simulation in Power Systems: Frequency Domain and Time Domain Analysis". Canadian Electrical Association, C E A Transactions. Montreal, Canada, March 1985. [13] J. R. Marti, "Accurate Modeling of Frequency-Dependent Transmission Lines in Electromagnetic Transient Simulations". IEEE Trans, on Power Apparatus and Systems, Vol . PAS-101, N o . l , pp.147-157, January 1982. [14] F. Castellanos and J. R. Marti, "Phase-Domain Multiphase Transmission Line Models". Proc. IPST'95, International Conference on Power Systems Transients, Lisbon, pp. 17-22, September 1995. [15] F. Castellanos and J . R. Marti, "Exact Modeling of Asymmetrical Multiple-Circuit Transmission Lines in EMTP Simulations". Trans. Eng./Op. Division, Canadian Electrical Association Conference. Montreal, Canada, April 1996. [16] F. Castellanos, " F U L L F R E Q U E N C Y - DEPENDENT PHASE - D O M A I N M O D E L I N G OF TRANSMISSION LINES A N D CORONA P H E N O M E N A " . Ph.D thesis at University of British Columbia. February 1997. [17] F. Castellanos and J. R. Marti, "Full Frequency-Dependent Phase-Domain Transmission Line Model". IEEE Transactions on Power Systems, Vol . 12, No.3, August 1997. [18] Chan, Raymond H, Chan, Tony F and Golub, Gene H, Iterative methods in scientific computing. New York: Springer, 1997. 76 Appendix 1 The Fitting Procedure Implementation for (i=l; i<=100; i+ + ) /* Repeat fitting procedure 100 times to get stable results */ { for(j=l;j<blk;j++) help[j] =j; for(j=blk-l;j>=l;j-) /* Fitting begins from the highest frequency */ { helpfj] =j+l; for (k=l; k<blk-l; k++) { RIfkJ = RfitfhelpfkJ; XI[k] = w[j]*Xfit[help[k]]/w[help[k]]; DIfkJ = RI[k]*RI[k] + Xl[kJ*XI[k]; J Rtran=Reqlfj'J; Xtran=Xeqljj]; for (k=l; k<blk-l; k++) { /* Subtract influences of rk and lk at the other frequencies */ Rtran = Rtran-RI[kJ*XI[k]*XI[kJ/DI[kJ; Xtran = Xtran-Rl[k]*RI[k]*XI[k]/DI[kJ; } 11 coef = Xtran/Rtran; Rfitfj] = Rtran*(coef*coef+l); /* Get rk */ Xfitfj-J = Rfitfj-J/coef; } } for (i=l; i<blk; i+ +) XfitfiJ = XfitfiJ/wfiJ; /* Get lk */ 78 

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0064818/manifest

Comment

Related Items