* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download branch equations
Variable-frequency drive wikipedia , lookup
Resistive opto-isolator wikipedia , lookup
Power engineering wikipedia , lookup
Electrical substation wikipedia , lookup
Topology (electrical circuits) wikipedia , lookup
Current source wikipedia , lookup
Three-phase electric power wikipedia , lookup
Stray voltage wikipedia , lookup
Immunity-aware programming wikipedia , lookup
Power electronics wikipedia , lookup
History of electric power transmission wikipedia , lookup
Opto-isolator wikipedia , lookup
Voltage optimisation wikipedia , lookup
Power MOSFET wikipedia , lookup
Buck converter wikipedia , lookup
Distribution management system wikipedia , lookup
Mains electricity wikipedia , lookup
Switched-mode power supply wikipedia , lookup
O.W. Andersen USER’S MANUAL, ACCAN AC CIRCUIT ANALYSIS PROGRAM INSTALLATION ACCAN is transmitted as a zip-file. It is extracted and installed in any directory (folder). The program can also be installed on a memory stick and run from there. RUNNING THE DEMO INPUT N2 B3 Nx = Node x Bx = Branch x B4 B5 B6 N1 Fig. 1 Here all the Command Prompt commands and file names will be in capital letters. However, they are case insensitive, and small letters can also be used. To run the program with an input file DEMO.INP, enter: RUN DEMO.INP After about a second, the calculations are completed. Output from ACCAN is stored in file OUTPUT. To display it on the screen, enter: FILE OUTPUT Batch command FILE starts the standard Windows program NOTEPAD. It will be used here for viewing, editing and printing text files. The first time it is invoked, it should be set to Courier New size 8, word wrap, and to no top and bottom extra text when printing. The window should always be maximized. For the three parallel layer reactor, special input has been made to draw the connection diagram on the screen, with indication directly on the diagram of calculated node voltages and branch currents. How this is done, will be explained later. The input is in file DEMO.PLT. Enter command: CONN DEMO.PLT -2- The graph that appears on the screen has been drawn on a Visual Basic Form. If the picture appears to be cropped or too small, adjust the file SIZESCR.FIL. At the same time a bitmap picture file PLOTFILE.BMP has been produced. Close the form and enter command: PLOT The graph now reappears in a standard Windows program. If it is desired to print it, crop the picture file first to remove empty space and save it. Microsoft Office Picture Manager or Microsoft Paint can be used for that. Rather than printing it directly, it is recommended to transfer the picture file to Microsoft Word. Here it can easily be resized and comments added before printing. INPUT The demo input file can be viewed with the command: FILE DEMO.INP What the numbers mean can be found on the input sheets. For an explanation of what else can be done with the input file, copy it first to a new file with the command: COPY DEMO.INP NEW.INP Introduce headings with the command: HEADINGS NEW.INP To see how the file now has been modified, enter: FILE NEW.INP The abbreviated headings on the input file also explain the numbers. With a little experience, that explanation suffices to enter new numbers and to make up new input files. Old input as similar as possible is first copied to a new input file. Then headings are introduced and the file changed. Numbers always start in columns 1, 11, 21 and so on. They can be entered with or without decimal point. Before the new file can be run, the headings must be removed. Do this first with: CLEANUP NEW.INP -3- A file without headings can have headings introduced and be viewed at the same time with: HEADFILE NEW.INP Headings can also be removed and the file run at the same time with: CLEANRUN NEW.INP New input must be entered very carefully, following explanations on the input sheets and instructions elsewhere in this manual. Small mistakes like a comma instead of a decimal point or a number starting in the wrong column are not tolerated. Some mistakes are caught by the program and are explained on the output. PROGRAM DESCRIPTION ACCAN is suitable for load flow calculations, short circuit calculations, and for other types of ac circuit analysis, also those involving mutual reactances (such as the reactor on Fig. 1). There are no restrictions on how the circuits are connected. The classical load flow solution methods consider only voltages to be the primary variables. This gives a minimum of unknowns in the equations, and helps in being able to solve large problems. However, it reduces the flexibility in the specification of the problems. -4- In ACCAN, both node voltages and branch currents are considered as primary variables. In load flow calculations, generators are represented as voltage or current sources, and loads either as impedances or current sources. Values of current in the current sources depend upon how the problem is formulated, and only rough estimates may be known initially. Therefore, an iterative solution is often required. Adjustments are made by the program on the basis of results from previous iterations. At each iteration a complex coefficient matrix is set up relating the variables to each other on the basis of node and branch equations. The matrix equation is solved directly by Gaussian elimination, immediately yielding values of all the variables. A slack bus generator is modelled as a simple voltage source with a fixed specified voltage. Other generators can be modelled as current sources in a variety of ways. Active and reactive power can be specified in the generator itself, or into or out of a relevant transmission line. The reactive power can also be adjusted automatically by the program within specified limits, to give a specified voltage either at the generator bus, or in an adjacent node. Loads can be fixed impedances or current sources. Active and reactive power can be specified, independent of voltage. Shunt reactors and capacitors can also be modeled as current sources. The program can determine the reactive power within specified limits to give a specified voltage at the reactor or capacitor bus. Transmission lines can be either simple impedances or -equivalents, specified in per unit or absolute values. Tap changing transformers can have the tap setting determined by the program, to give an approximate specified voltage at a relevant node. From a given set of input data, transmission lines can be disconnected simply by changing a code. Systematic input data modification can be made by a small subroutine. Normal output includes node voltages, branch currents, active and reactive power into and out of branches, and deviations from specified voltages and power. Sums of active and reactive power are given for generation, load, transmission lines and shunt reactors and capacitors. A post processor permits graphical output in the form of a complete or partial connection diagram, with the results of the calculation written in. All the user must do is to make up a small input file with plotting instructions for each branch and node, or in the case of a load flow calculation, for each bus and transmission line. An input program is available for this purpose. If the connection diagram is large, calculation results may be hard or impossible to read on the graphical output after the necessary reduction in scale. The diagram should then be broken up into several smaller partial diagrams. The program is limited to 500 variables (node voltages and branch currents), which in a load flow problem corresponds to about 100-140 busses. AC CIRCUIT ANALYSIS PROGRAM ACCAN INPUT SHEET 1 Numerical data are entered with the first digit in columns 1,11,21 etc., as indicated. Decimal point is optional. The calculations are often made in per unit. This is always true in load flow calculations. Otherwise absolute values can be used, provided the numbers stay within the limits of the formatted output. Nodes and branches are numbered. Start with the nodes. Node 1 receives the reference potential zero. In a one line diagram of a three phase system. it represents the neutral. Each separate circuit (without electrical connection) must have a node with the number one. When all the nodes are numbered, continue with the branches. The first branch receives the number of the last node plus one. The last branch number is the same as the total number of variables, which are node potentials and branch currents. Each branch contains only one component (impedance, voltage source, current source), and terminates at two nodes. Positive power flow is from the first to the second node. Each tap changing of off ratio transformer introduces one extra node. IDENTIFICATION (line 1): No commas and max. 80 characters, including blanks NUMBER OF MUTUAL REACTANCES ( 500, usually 0) LAST NODE NUMBER LAST BRANCH NUMBER MAX. NUMBER OF ITERATIONS ( 20, 1 if direct solution) MAX. CHANGE OF VOLTAGE BETWEEN ITERATIONS ( 0.0001 pu) RELAXATION FACTOR ( 1) FREQUENCY BASE 3-PHASE POWER, MVA Col. 1 11 21 31 41 51 *1 61 *2 71 Data Line 2 *1 Only required 0 if needed to convert input data to per unit or ohms. *2 It is recommended to make the base MVA 1, 10, 100 or 1000. Mutual reactances between branches (not required in load flow calculations) FIRST BRANCH NUMBER 1 SECOND BRANCH NUMBER 11 MUTUAL REACTANCE (can be negative) 21 FIRST BRANCH NUMBER 1 SECOND BRANCH NUMBER 11 MUTUAL REACTANCE (can be negative) 21 FIRST BRANCH NUMBER 1 SECOND BRANCH NUMBER 11 MUTUAL REACTANCE (can be negative) 21 FIRST BRANCH NUMBER 1 SECOND BRANCH NUMBER 11 MUTUAL REACTANCE (can be negative) 21 FIRST BRANCH NUMBER 1 SECOND BRANCH NUMBER 11 MUTUAL REACTANCE (can be negative) 21 FIRST BRANCH NUMBER 1 SECOND BRANCH NUMBER 11 MUTUAL REACTANCE (can be negative) 21 FIRST BRANCH NUMBER 1 SECOND BRANCH NUMBER 11 MUTUAL REACTANCE (can be negative) 21 FIRST BRANCH NUMBER 1 SECOND BRANCH NUMBER 11 MUTUAL REACTANCE (can be negative) 21 FIRST BRANCH NUMBER 1 SECOND BRANCH NUMBER 11 MUTUAL REACTANCE (can be negative) 21 Input sheets 3 to 8 are not normally filled out. They only serve as a source of information about the data that are to be entered on input sheet 2. AC CIRCUIT ANALYSIS PROGRAM ACCAN INPUT SHEET 2 Column 1 11 21 31 41 51 61 71 1 11 21 31 Branch Code See instructions on input sheets 3 to 8 New line _______________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ It is not necessary to enter branch numbers in ascending order. AC CIRCUIT ANALYSIS PROGRAM ACCAN INPUT SHEET 3 Generation Slack bus, specified U BRANCH NUMBER CODE BUS, NODE NUMBER ABS. VALUE OF U, specified ANGLE OF U, degrees, specified (usually 0) Voltage source with specified U and P BRANCH NUMBER CODE BUS, NODE NUMBER ABS. VALUE OF U, specified ANGLE OF U, degrees, initial (often 0) ACTIVE POWER P, specified Specified U, P, Q-MIN, Q-MAX BRANCH NUMBER CODE BUS, NODE NUMBER ABS. VALUE OF U, specified ANGLE OF U, degrees, initial (often 0) ACTIVE POWER P, specified REACTIVE POWER Q, initial Q-MIN, specified Q-MAX, specified Specified P, Q BRANCH NUMBER CODE BUS, NODE NUMBER ABS. VALUE OF U, initial ANGLE OF U, degrees, initial (often 0) ACTIVE POWER P, specified REACTIVE POWER Q, specified Specified U, Q-MIN, Q-MAX, active power interchange BRANCH NUMBER CODE BUS, NODE NUMBER ABS. VALUE OF U, specified ANGLE OF U, degrees, initial (often 0) ACTIVE POWER P, initial REACTIVE POWER Q, initial Q-MIN, specified Q-MAX, specified ACTIVE POWER INTERCHANGE INTO = 1, OUT OF = 2 BRANCH NUMBER (transmission line or cable) Specified Q, active power interchange BRANCH NUMBER CODE BUS, NODE NUMBER ABS. VALUE OF U, initial ANGLE OF U, degrees, initial (often 0) ACTIVE POWER P, initial REACTIVE POWER Q, specified ACTIVE POWER INTERCHANGE INTO = 1, OUT OF = 2 BRANCH NUMBER (transmission line or cable) Col. 1 11 21 31 41 Data Line 2 bus U 1 11 21 31 41 51 1 11 21 * 31 41 51 61 71 1 3 node 1 12 U bus I 1 11 21 13 node 1 31 41 51 61 1 11 21 * 31 41 51 61 71 1 11 21 31 14 U bus I 1 11 21 15 31 41 51 61 71 1 11 * The specified voltage is conditional on the reactive power staying within specified limits. node 1 AC CIRCUIT ANALYSIS PROGRAM ACCAN INPUT SHEET 4 Generation, cont. Specified P, reactive power interchange BRANCH NUMBER CODE BUS, NODE NUMBER ABS. VALUE OF U, initial ANGLE OF U, degrees, initial (often 0) ACTIVE POWER P, specified REACTIVE POWER Q, initial REACTIVE POWER INTERCHANGE INTO = 1, OUT OF = 2 BRANCH NUMBER (transmission line or cable) Specified P, Q-MIN, Q-MAX, U in adjacent node BRANCH NUMBER, GENERATOR CODE BUS, NODE NUMBER ABS. VALUE OF U, adjacent node, specified IN ADJACENT NODE NUMBER ABS. VALUE OF U, GENERATOR BUS, initial ANGLE OF U, GENERATOR BUS, DEGREES, initial ACTIVE POWER P, specified REACTIVE POWER Q, initial Q-MIN, specified Q-MAX, specified Specified U in adjacent node, U = U0 + coeff. * ABS(I) BRANCH NUMBER, GENERATOR (with current I) CODE BUS, NODE NUMBER ADJACENT NODE NUMBER ABS. VALUE OF CONSTANT VOLTAGE U0 ANGLE OF U0, DEGREES (often zero) COEFFICIENT (can be negative) U-LIM (upper or lower limit) Col. 1 11 21 Data Line 16 U 31 bus 41 51 61 71 1 11 I node 1 1 11 21 *1 31 41 51 61 71 1 11 21 1 11 21 31 41 *2 51 61 71 17 adjacent node low impedance bus I node 1 adjacent node 18 Load Specified impedance BRANCH NUMBER 1 CODE 11 21 BUS, NODE NUMBER 21 RESISTANCE 31 REACTANCE (negative if capacitive) 41 ACTIVE = 1, DISCONNECTED = 0 51 Specified impedance in ohms per phase, to be converted to per unit by the program BRANCH NUMBER 1 CODE 11 22 BUS, NODE NUMBER 21 RESISTANCE 31 REACTANCE (negative if capacitive) 41 BASE LINE VOLTAGE, KV 51 ACTIVE = 1, DISCONNECTED = 0 61 bus I node 1 bus node 1 *1: The specified voltage is conditional on the reactive power staying within specified limits. *2: If the source is overloaded with angle of U0 equal to zero, the load can often be reduced by shifting the phase angle a few degrees. A minimum load will occur for a certain angle. In a purely inductive circuit, the angle is negative. If the source is still overloaded, the voltage must be reduced. In an M-G set, the phase angle of U0 is adjusted with the motor excitation. AC CIRCUIT ANALYSIS PROGRAM ACCAN INPUT SHEET 5 Load, cont. Specified P, Q (independent of voltage) Col. Data Line BRANCH NUMBER 1 CODE 11 23 BUS, NODE NUMBER 21 ABS. VALUE OF U, INITIAL 31 ANGLE OF U, degrees, initial (often 0) 41 ACTIVE POWER P, specified 51 REACTIVE POWER Q, specified (neg. if capacitive) 61 Specified series resistance, inductance and capacitance, to be converted to ohms by the program. BRANCH NUMBER 1 CODE 11 24 BUS, NODE NUMBER 21 RESISTANCE 31 INDUCTANCE, mH 41 CAPACITANCE, F 51 ACTIVE = 1, DISCONNECTED = 0 61 Specified series impedance BRANCH NUMBER 1 CODE 11 25 FIRST NODE NUMBER 21 LAST NODE NUMBER 31 RESISTANCE 41 REACTANCE (negative if capacitive) 51 ACTIVE = 1, DISCONNECTED = 0 61 Specified P and Q in series impedance BRANCH NUMBER 1 CODE 11 26 FIRST NODE NUMBER 21 LAST NODE NUMBER 31 ABS. VALUE OF U, INITIAL (difference between nodes) 41 ANGLE OF U, degrees, initial (often 0) 51 ACTIVE POWER P, specified 61 REACTIVE POWER Q, specified (negative if capacitive) 71 bus I node 1 bus node 1 first node last node first node I last node Shunt reactors/capacitors Specified reactance BRANCH NUMBER 1 CODE 11 31 BUS, NODE NUMBER 21 REACTANCE (negative if capacitive) 31 ACTIVE = 1, DISCONNECTED = 0 41 Specified reactance in ohms per phase, to be converted to per unit by the program. BRANCH NUMBER 1 CODE 11 32 BUS, NODE NUMBER 21 REACTANCE (negative if capacitive) 31 BASE LINE VOLTAGE, KV 41 ACTIVE = 1, DISCONNECTED = 0 51 Specified U, Q-MIN, Q-MAX BRANCH NUMBER 1 CODE 11 33 BUS, NODE NUMBER 21 ABS. VALUE OF U, specified * 31 ANGLE OF U, degrees, initial (often 0) 41 REACTIVE POWER Q, initial 51 Q-MAX, specified 61 ACTIVE=1, DISCONNECTED=0 71 * The specified voltage is conditional on the reactive power staying within specified limits. bus node 1 bus I AC CIRCUIT ANALYSIS PROGRAM ACCAN INPUT SHEET 6 Transmission (lines, cables, transformers) Specified series impedance Col. Data Line BRANCH NUMBER 1 CODE 11 41 FIRST NODE NUMBER 21 LAST NODE NUMBER 31 RESISTANCE 41 first node REACTANCE (negative if capacitive) 51 ACTIVE = 1, DISCONNECTED = 0 61 Specified series impedance in ohms per phase, to be converted to per unit by the program. BRANCH NUMBER 1 CODE 11 42 FIRST NODE NUMBER 21 LAST NODE NUMBER 31 last node RESISTANCE 41 REACTANCE (negative if capacitive) 51 BASE LINE VOLTAGE, KV 61 ACTIVE = 1, DISCONNECTED = 0 71 -equivalent with three branches BRANCH NUMBER, SERIES IMPEDANCE 1 CODE 11 43 FIRST NODE NUMBER 21 LAST NODE NUMBER 31 SERIES RESISTANCE ) often including 41 SERIES REACTANCE ) transformer impedance 51 first node CAPACITIVE SHUNT ADMITTANCE Y 61 FIRST BRANCH NUMBER WITH SHUNT ADMITTANCE Y/2 71 LAST BRANCH NUMBER WITH SHUNT ADMITTANCE Y/2 1 ACTIVE = 1, DISCONNECTED = 0 11 -equivalent with three branches, ohms and μF per phase to be converted to per unit by the program. BRANCH NUMBER, SERIES IMPEDANCE 1 CODE 11 44 FIRST NODE NUMBER 21 LAST NODE NUMBER 31 SERIES RESISTANCE ) ohms, often including 41 last node SERIES REACTANCE ) transformer impedance 51 F PER PHASE, FOR CALC. OF SHUNT ADMITTANCE Y 61 FIRST BRANCH NUMBER WITH SHUNT ADMITTANCE Y/2 71 LAST BRANCH NUMBER WITH SHUNT ADMITTANCE Y/2 1 BASE LINE VOLTAGE, KV 11 ACTIVE = 1, DISCONNECTED = 0 21 Specified series resistance, inductance and capacitance, to be converted to ohms by the program. BRANCH NUMBER 1 CODE 11 45 FIRST NODE NUMBER 21 LAST NODE NUMBER 31 RESISTANCE 41 INDUCTANCE, mH 51 CAPACITANCE, F 61 ACTIVE = 1, DISCONNECTED = 0 71 node 1 When included in per unit line impedance, per unit transformer impedance must be converted to the base MVA, specified on input sheet 1. This implies that nameplate per unit impedance must be multiplied by (base MVA)/(nameplate MVA). Ohms per phase is found by multiplying nameplate per unit impedance by (base line kV) /(nameplate MVA) AC CIRCUIT ANALYSIS PROGRAM ACCAN INPUT SHEET 7 Tap changing or off ratio transformers, involving one additional node and two branches. Specified U in per unit of voltage at first, non regulated node. Col. Data BRANCH NUMBER, VOLTAGE SOURCE 1 CODE 11 51 FIRST NODE NUMBER (non regulated node) 21 LAST NODE NUMBER 31 BRANCH NUMBER, CURRENT SOURCE 41 U, SPECIFIED IN PU OF VOLTAGE AT FIRST NODE 51 ANGLE OF U WITH RESPECT TO VOLTAGE AT FIRST NODE (degrees, specified, often 0) 61 Specified U in arbitrary node. U is in phase with the voltage at the first node. BRANCH NUMBER, VOLTAGE SOURCE 1 CODE 11 52 FIRST NODE NUMBER 21 LAST NODE NUMBER 31 BRANCH NUMBER, CURRENT SOURCE 41 ABS. VALUE OF U, specified approximately 51 IN NODE NUMBER 61 U PER STEP, per unit of base line voltage 71 INITIAL STEP NUMBER, positive or negative 1 MAX. NUMBER OF STEPS, NEGATIVE DIRECTION 11 POSITIVE DIRECTION 21 Line U I node 1 Zeros if disconnected AC CIRCUIT ANALYSIS PROGRAM ACCAN INPUT SHEET 8 Voltage sources Specified U BRANCH NUMBER CODE FIRST NODE NUMBER LAST NODE NUMBER ABS. VALUE OF U, specified ANGLE OF U, degrees, specified Linear function BRANCH NUMBER CODE FIRST NODE NUMBER LAST NODE NUMBER U = COEFFICIENT TIMES VALUE OF VARIABLE NO. + COEFFICIENT TIMES VALUE OF VARIABLE NO. Function, programmed by user (see user's manual) BRANCH NUMBER CODE FIRST NODE NUMBER LAST NODE NUMBER Col. 1 11 21 31 41 51 1 11 21 31 41 51 61 71 1 11 21 31 Data Line 1 9 First node U Last node 10 Current sources Specified I BRANCH NUMBER CODE FIRST NODE NUMBER LAST NODE NUMBER ABS. VALUE OF I, specified ANGLE OF I, degrees, specified Linear function BRANCH NUMBER CODE FIRST NODE NUMBER LAST NODE NUMBER I = COEFFICIENT TIMES VALUE OF VARIABLE NO. + COEFFICIENT TIMES VALUE OF VARIABLE NO. Function, programmed by user (see user's manual) BRANCH NUMBER CODE FIRST NODE NUMBER LAST NODE NUMBER 1 11 21 31 41 51 1 11 21 31 41 51 61 71 1 11 21 31 11 19 First node I Last node 20 - 13 - BRANCH EQUATIONS Impedance: U1 I r x U2 (x can be capacitive) xm Im Fig. 2 U1 - U2 = (r+jx)I + jxmIm The equation is used to determine either U1, U2 or I. Voltage source: U U1 I U2 Fig. 3 U2 - U1 = U The equation is used to determine U1 or U2. I must be determined from a node equation (I = 0). Current source: I U1 U2 Fig. 4 The branch current is set equal to that of the current source. U1 and U2 must be determined from other branch equations. If there are isolated nodes, they are given the voltage zero. Isolated and disconnected branches get zero currents. - 14 - ASSIGNMENT OF NODE EQUATIONS FOR DETERMINATION OF BRANCH CURRENTS A node equation is derived from the sum of the currents into the node equal to zero. It is used to determine the current in one of the branches connected to the node. Initially up to three branches can be assigned tentatively in array ASSIG(500,3). For node I, the branch which is finally chosen will eventually end up in ASSIG(I,1). If it can be determined already at the outset which branch will be used, the branch is assigned in a singular assignment. In multiple assignments, initial preference is given to branches with only voltage sources, otherwise to the branches with the lowest branch numbers. ASSIGNMENT OF BRANCH EQUATIONS FOR DETERMINATION OF BRANCH CURRENTS AND NODE POTENTIALS A branch equation can be used to determine the branch current, or the potential at one of its two nodes. The branch number and the two node numbers are therefore often entered initially in array ASSIG(500,3). For branch I, the variable which is finally chosen will eventually end up in ASSIG(I,1). The potential at node 1 is the reference potential zero. Therefore, node 1 is never assigned. If it is possible to determine at the outset that only one of the three variables can be used, it is assigned in a singular assignment. SINGULAR ASSIGNMENTS If a branch B has a current source, an open switch or is short circuited, the branch equation for branch B must be used to determine the current in branch B. If a branch B with only a voltage source is connected to node Nx, and its other node is N1 with the reference potential zero, then the node equation for node Nx must be used to determine the branch current in branch B. The inverse singular assignment also applies, in that the branch equation for branch B must be used to determine the node potential at node Nx. If a node NxN1 has only one branch B connected to it without a current source, an open switch or a short circuit, then the node equation for node Nx must be used to determine the branch current in branch B. Also here the inverse singular assignment applies, in that the branch equation for branch B must be used to determine the potential at node Nx. - 15 - FINAL ASSIGNMENTS In the final assignments in ASSIG(I,1), all the variables should appear once, so that they can be determined by an equal number of linear equations. The rearrangement of array ASSIG to accomplish this from the initial tentative assignments where variables may be missing in ASSIG(I,1) and appear more than once, is done with an algorithm which rotates variables between ASSIG(I,1), (I,2) and (I,3), eliminates variables, and successively narrows down the choice. This algorithm has been refined to a point where it is very reliable. Nevertheless, it is easy to conceive of haphazard node and branch numbering for some circuits, which will make its task impossible. The numbering should be done in an orderly fashion, with node and branch numbers progressing through the circuit in roughly the same way. CURRENT AND VOLTAGE SOURCE DETERMINATION Current, on the basis of active power P, reactive power Q and voltage U (* means complex conjugate): P+jQ I = ()* U If the voltage U is specified at the bus or in an adjacent node, and the reactive power Q is unspecified, a new value of Q at iteration n is calculated from the values of U and Q at iterations n-1 and n-2 as: U-Un-2 Qn = Qn-2 + R (Qn-1 - Qn-2) Un-1 - Un-2 U is the specified voltage, and R is the relaxation factor given on input sheet 1. Qn is set equal to the limit, if one of the specified limits Q-MIN or Q-MAX is exceeded. If the active generator power P is to be determined from a specified power interchange P i in a relevant transmission line, the value of P is similarly: Pi-Pi,n-2 Pn = Pn-2 + R (Pn-1 - Pn-2) Pi,n-1 - Pi,n-2 At the first iteration, initial values are always entered in Eq.(1). Later, U is taken from iteration n-1. At the second iteration, it is not yet possible to use equations (2) and (3), so arbitrary, reasonable values must be chosen. In a tap changing transformer with code 52 the tap setting at the n-th iteration can be adjusted one step up or down, depending on how the calculated voltage compares with the specified voltage. The limits must of course be observed. The relaxation factor does not apply to this adjustment. The value of I in the current source is determined so that the apparent power in the current source equals that of the voltage source. - 16 - PLOTTING OF CONNECTION DIAGRAMS A post processor can be used to plot a complete or partial connection diagram with the results of the calculation written in. This is done on the basis of a small input file with plotting instructions for each branch and node, or in the case of a load flow calculation, for each bus and transmission line. Input file DEMO.PLT for the parallel layer reactor in Fig. 1 is shown below. The parameters are explained later. They always start in columns 10, 15, 20, 25 etc., and the name of a subroutine in capital letters starts in column 1. The resulting graph is on the last page of the manual. NODE NODE SOURCE LR LR LR 5 5 5 40 70 100 20 65 20 20 20 20 100 100 5 40 70 100 20 65 65 65 65 65 0 2 3 4 5 6 1 -1 -1 -1 An input file STEV.PLT for a load flow graph is also shown. It is for example 10.1 on page 219 of W.D. Stevenson: "Elements of Power System Analysis", second edition, McGraw-Hill 1962. The resulting graph is also on the last page of the manual. BUS WHITE BUS RED BUS GREEN BUS BLUE BUS YELLOW TRAN TRAN TRAN TRAN TRAN TRAN 70 105 195 160 2 7 0 0 70 120 155 85 3 0 10 0 0 50 80 25 4 8 0 0 145 170 195 25 5 0 11 0 0 50 80 105 6 0 9 0 75 150 190 5 75 150 160 160 160 25 25 85 75 150 190 5 75 150 105 85 25 105 85 25 2 2 2 4 4 3 6 3 5 6 3 5 12 13 14 15 16 17 12 13 14 15 16 17 0 0 0 0 0 0 0 0 0 0 0 0 When subroutine BUS is called by an input line, it must be followed by a line with the name of the bus. This name is plotted on the graph. The plotting is done as explained on pages 1 and 2, where the parameter for the CONN batch command is the name of the input file with the plotting instructions. - 17 SUBROUTINES THAT CAN BE CALLED IN PLOTTING INPUT FILES C C C C --------- SUBROUTINE NODE(X1,Y1,X2,Y2,IN) DRAWS NODE AS HORIZONTAL LINE FOR Y1=Y2 OR VERTICAL LINE FOR X1=X2 BETWEEN X1,Y1 AND X2,Y2. IN IS THE VARIABLE NUMBER FOR THE NODE POTENTIAL (CAN BE ZERO). IF IN=0, THE SUBROUTINE SIMPLY DRAWS A HORIZONTAL OR VERTICAL LINE. C C C C C ----------- SUBROUTINE SOURCE(X1,Y1,X2,Y2,IN,IARR) DRAWS SOURCE HORIZONTALLY FOR Y1=Y2 OR VERTICALLY FOR X1=X2 BETWEEN X1,Y1 AND X2,Y2. IN IS THE BRANCH NUMBER (VARIABLE NOT DRAWN IF IN=0). IARR=1 MEANS ARROW POINTING RIGHT OR UP, IARR=-1 LEFT OR DOWN. IARR MUST CORRESPOND WITH THE POSITIVE DIRECTION OF THE VARIABLE. C C C C C C C --------------- SUBROUTINE LR(X1,Y1,X2,Y2,IN,IARR) OR RL(X1,Y1,X2,Y2,IN,IARR) DRAWS INDUCTOR, RESISTOR AND ARROW HORIZONTALLY IF Y1=Y2, VERTICALLY IF X1=X2, BETWEEN X1,Y1 AND X2,Y2. IN IS THE VARIABLE NUMBER FOR THE CURRENT (IN AND IARR CAN BE ZERO). IARR=1 MEANS ARROW POINTING RIGHT OR UP, IARR=-1 LEFT OR DOWN. IARR MUST CORRESPOND WITH THE POSITIVE DIRECTION OF THE CURRENT. THE LENGTH BETWEEN X1,Y1 AND X2,Y2 MUST BE >= 55 MM IF THE BRANCH IS HORIZONTAL, 45 MM IF IT IS VERTICAL. C C C C C C C --------------- SUBROUTINE R(X1,Y1,X2,Y2,IN,IARR) DRAWS RESISTOR AND ARROW HORIZONTALLY IF Y1=Y2, VERTICALLY IF X1=X2, BETWEEN X1,Y1 AND X2,Y2. IN IS THE VARIABLE NUMBER FOR THE CURRENT (IN AND IARR CAN BE ZERO). IARR=1 MEANS ARROW POINTING RIGHT OR UP, IARR=-1 LEFT OR DOWN. IARR MUST CORRESPOND WITH THE POSITIVE DIRECTION OF THE CURRENT. THE LENGTH BETWEEN X1,Y1 AND X2,Y2 MUST BE >= 40 MM IF THE BRANCH IS HORIZONTAL, 30 MM IF IT IS VERTICAL. C C C C C C C --------------- SUBROUTINE L(X1,Y1,X2,Y2,IN,IARR) DRAWS INDUCTOR AND ARROW HORIZONTALLY IF Y1=Y2, VERTICALLY IF X1=X2, BETWEEN X1,Y1 AND X2,Y2. IN IS THE VARIABLE NUMBER FOR THE CURRENT (IN AND IARR CAN BE ZERO). IARR=1 MEANS ARROW POINTING RIGHT OR UP, IARR=-1 LEFT OR DOWN. IARR MUST CORRESPOND WITH THE POSITIVE DIRECTION OF THE CURRENT. THE LENGTH BETWEEN X1,Y1 AND X2,Y2 MUST BE >= 40 MM IF THE BRANCH IS HORIZONTAL, 30 MM IF IT IS VERTICAL. C C C C C C C --------------- SUBROUTINE C(X1,Y1,X2,Y2,IN,IARR) DRAWS CAPACITOR AND ARROW HORIZONTALLY IF Y1=Y2, VERTICALLY IF X1=X2, BETWEEN X1,Y1 AND X2,Y2. IN IS THE VARIABLE NUMBER FOR THE CURRENT (IN AND IARR CAN BE ZERO). IARR=1 MEANS ARROW POINTING RIGHT OR UP, IARR=-1 LEFT OR DOWN. IARR MUST CORRESPOND WITH THE POSITIVE DIRECTION OF THE CURRENT. THE LENGTH BETWEEN X1,Y1 AND X2,Y2 MUST BE >= 32 MM IF THE BRANCH IS HORIZONTAL, 22 MM IF IT IS VERTICAL. - 18 - --------------- SUBROUTINE RC(X1,Y1,X2,Y2,IN,IARR) OR CR(X1,Y1,X2,Y2,IN,IARR) DRAWS RESISTOR, CAPACITOR AND ARROW HORIZONTALLY IF Y1=Y2, VERTICALLY IF X1=X2, BETWEEN X1,Y1 AND X2,Y2. IN IS THE VARIABLE NUMBER FOR THE CURRENT (IN AND IARR CAN BE ZERO). IARR=1 MEANS ARROW POINTING RIGHT OR UP, IARR=-1 LEFT OR DOWN. IARR MUST CORRESPOND WITH THE POSITIVE DIRECTION OF THE CURRENT. THE LENGTH BETWEEN X1,Y1 AND X2,Y2 MUST BE >= 47 MM IF THE BRANCH IS HORIZONTAL, 37 MM IF IT IS VERTICAL. C C C C C C C C ----------------- SUBROUTINE BUS(XL,XC,XR,Y,IN,IG,IL,IR) DRAWS BUS AS A HORIZONTAL LINE BETWEEN XL,Y AND XR,Y WITH GENERATION ABOVE BETWEEN XC-9,Y AND XC+9,Y+22.5 AND LOAD BELOW BETWEEN XC-9,Y-22.5 AND XC+9,Y. VARIABLE NUMBERS ARE: IN: NODE POTENTIAL IG: GENERATOR CURRENT IL: LOAD CURRENT IR: CURRENT, SHUNT REACTOR OR CAPACITOR (ZERO IF NONE) C C C C C C C C C ------------------- SUBROUTINE TRAN(X1,Y1,X2,Y2,IF,IL,ITF,ITL,I1,I2) DRAWS TRANSMISSION LINE AS A VERTICAL OR SLANTED LINE BETWEEN X1,Y1 AND X2,Y2. MAX SLANT 30 DEGREES WITH VERTICAL. VARIABLE NUMBERS ARE: IF: VOLTAGE, FIRST BUS (AT X1,Y1) IL: VOLTAGE, LAST BUS (AT X2,Y2) ITF: CURRENT INTO LINE ITL: CURRENT OUT OF LINE I1: CURRENT, SHUNT REACTOR OR CAPACITOR AT X1,Y1 (ZERO IF NONE) I2: CURRENT, SHUNT REACTOR OR CAPACITOR AT X2,Y2 (ZERO IF NONE) ----------------------- SUBROUTINE TRAN2(X1,Y1,X2,Y2,IF,IL,ITF,ITL,I1,I2,I3,I4) DRAWS TRANSMISSION LINE WITH TWO WINDING TRANSFORMER AS A VERTICAL OR SLANTED LINE BETWEEN X1,Y1 AND X2,Y2. VARIABLE NUMBERS ARE: IF: VOLTAGE, FIRST BUS (AT X1,Y1) IL: VOLTAGE, LAST BUS (AT X2,Y2) ITF: CURRENT INTO LINE ITL: CURRENT OUT OF LINE I1: CURRENT, SHUNT REACTOR OR CAPACITOR AT X1,Y1 (ZERO IF NONE) I2: CURRENT, SHUNT REACTOR OR CAPACITOR AT X2,Y2 (ZERO IF NONE) I3: VOLTAGE BEFORE TRANSFORMER I4: VOLTAGE AFTER TRANSFORMER C C C C C C C C C C C C C C C C C C - 19 - When subroutines BUS is called by an input line, it must be followed by a line of text. It serves as identification. THE COMMAND PROMPT ENVIRONMENT The Command Prompt window should be maximized and the size adjusted to fill the screen after right clicking the top title bar. Cursor size small and letter size 12x16 pixels are recommended. If Command Prompt goes into full screen mode by an application, it can be brought back with Alt-Enter. Since many PC users are not familiar with Command Prompt, here are some hints and frequently used commands. The commands are examples and may be modified in obvious manners. Large and small letters are interchangeable. Commands given once on startup, perhaps in a STARTUP.BAT file: SET COPYCMD=/Y Deactivates warning on overwriting existing files. PATH=C:\SYSTEM;C:\QBASIC Specifies search paths for executable files. SUBST P: C:\DRIVEP Substitutes drive P for directory (or folder) C:\DRIVEP making P a virtual drive (or unit). Other commands: C: Moves to unit C or another unit. CD\ Changes to base directory. MD GRAPHICS Makes directory GRAPHICS. CD\GRAPHICS Changes directory to GRAPHICS, just below the base directory. COPY OLD.INP NEW.INP Copies old file OLD.INP to a new file NEW.INP. COPY /? Explains options available for command COPY. REN OLD.INP NEW.INP Renames OLD.INP as NEW.INP. DEL OLD.INP Deletes OLD.INP. DIR *.INP Lists all files in the directory with extension INP. DIR *.I?? Lists all files in the directory with three letter extension starting with I. START NOTEPAD OUTPUT Invokes Windows program NOTEPAD with file OUTPUT. START PLOTFILE.BMP Starts a standard Windows program to process the bitmap file. PROGRAM ACCAN AC CIRCUIT ANALYSIS THREE PARALLEL LAYER REACTOR RELAXATION FACTOR 0.000 FREQUENCY 0.0 BASE 3-PHASE POWER, MVA FIRST BRANCH NO. 4 4 5 BRANCH 3 4 5 6 CODE 11 21 21 21 ITERATION NO. 1 0.000 SECOND BRANCH NO. 5 6 6 NODE 1 2 2 2 MUTUAL REACTANCE 0.603900 0.523400 0.606100 OTHER INPUT DATA 2.000E+00 5.770E+02 2.950E-02 7.638E-01 2.720E-02 6.779E-01 2.920E-02 7.561E-01 0.000E+00 1.000E+00 1.000E+00 1.000E+00 MAX. CHANGE OF VOLTAGE 363.203400 GENERATION LOAD TRANSMISSION SHUNT REACTORS/CAPACITORS ACTIVE POWER 0.0000E+00 3.1767E+03 0.0000E+00 0.0000E+00 REACTIVE POWER 0.0000E+00 2.0954E+05 0.0000E+00 0.0000E+00 NODE NO. 1 2 VOLTAGE ABS. VALUE 0.000000 363.203400 ANGLE, DEG. 0.0000 89.1315 REAL COMP. 0.000000 5.505490 IMAG. COMP. 0.000000 363.161682 BRANCH NO. 3 4 5 6 CURRENT ABS. VALUE 577.000000 189.226135 194.202057 193.608704 ANGLE, DEG. 0.0000 0.4083 -0.9077 0.5114 REAL COMP. 577.000000 189.221329 194.177689 193.600998 IMAG. COMP. 0.000000 1.348558 -3.076461 1.727903 POWER INTO BRANCH ACTIVE REACTIVE 0.0000E+00 0.0000E+00 1.5315E+03 6.8711E+04 -4.8209E+01 7.0535E+04 1.6934E+03 7.0299E+04 POWER OUT ACTIVE 3.1767E+03 0.0000E+00 0.0000E+00 0.0000E+00 OF BRANCH REACTIVE 2.0954E+05 0.0000E+00 0.0000E+00 0.0000E+00 PROGRAM ACCAN AC CIRCUIT ANALYSIS STEVENSON EXAMPLE 10.1 RELAXATION FACTOR 1.000 FREQUENCY 0.0 BASE 3-PHASE POWER, MVA BRANCH 7 8 9 10 11 12 13 14 15 16 17 CODE 2 12 23 23 23 41 41 41 41 41 41 ITERATION NO. 1 2 3 4 5 6 NODE 2 4 6 3 5 2 2 2 4 4 3 0.000 OTHER INPUT DATA 1.020E+00 0.000E+00 1.040E+00 0.000E+00 1.000E+00 0.000E+00 1.000E+00 0.000E+00 1.000E+00 0.000E+00 6.000E+00 5.000E-02 3.000E+00 1.000E-01 5.000E+00 1.500E-01 6.000E+00 5.000E-02 3.000E+00 5.000E-02 5.000E+00 1.000E-01 1.000E+00 6.000E-01 6.000E-01 4.000E-01 2.000E-01 4.000E-01 6.000E-01 2.000E-01 2.000E-01 4.000E-01 3.000E-01 2.000E-01 3.000E-01 1.000E-01 1.000E+00 1.000E+00 1.000E+00 1.000E+00 1.000E+00 1.000E+00 0.000E+00 1.000E+00 MAX. CHANGE OF VOLTAGE 1.024774 0.019740 0.016223 0.010769 0.000853 0.000073 THE SOLUTION CONVERGED TO THE SPECIFIED MAXIMUM CHANGE OF VOLTAGE GENERATION LOAD TRANSMISSION SHUNT REACTORS/CAPACITORS ACTIVE POWER 1.6516E+00 1.6001E+00 5.1501E-02 0.0000E+00 REACTIVE POWER 8.0598E-01 5.9998E-01 2.0600E-01 0.0000E+00 NODE NO. 1 2 3 4 5 6 VOLTAGE ABS. VALUE 0.000000 1.020000 0.954768 1.040025 0.923464 0.993123 ANGLE, DEG. 0.0000 0.0000 -3.9412 2.0010 -8.0075 -2.0726 REAL COMP. 0.000000 1.020000 0.952510 1.039391 0.914460 0.992473 IMAG. COMP. 0.000000 0.000000 -0.065625 0.036315 -0.128641 -0.035917 BRANCH NO. 7 8 9 10 11 12 13 14 15 16 17 CURRENT ABS. VALUE 0.715537 1.065370 0.636874 0.702633 0.446473 0.219506 0.228312 0.269045 0.417804 0.649706 0.178539 ANGLE, DEG. -26.7970 -23.4952 -20.5056 -30.5042 -22.0435 -23.4307 -31.7665 -25.3299 -18.9693 -26.4039 -17.0878 REAL COMP. 0.638695 0.977044 0.596521 0.605383 0.413836 0.201406 0.194111 0.243179 0.395115 0.581930 0.170657 IMAG. COMP. -0.322586 -0.424734 -0.223097 -0.356657 -0.167566 -0.087284 -0.120197 -0.115105 -0.135812 -0.288922 -0.052461 POWER INTO BRANCH ACTIVE REACTIVE 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 6.0004E-01 1.9999E-01 6.0004E-01 2.9999E-01 3.9999E-01 9.9996E-02 2.0543E-01 8.9030E-02 1.9799E-01 1.2260E-01 2.4804E-01 1.1741E-01 4.0575E-01 1.5551E-01 5.9436E-01 3.2144E-01 1.6600E-01 3.8770E-02 DEVIATIONS FROM SPECIFIED VOLTAGE NODE NO. 2 4 VOLTAGE DEVIATION 0.000000 0.000025 DEVIATIONS FROM SPECIFIED POWER BRANCH NO. 8 9 10 11 DEVIATION, POWER INTO BRANCH ACTIVE REACTIVE 0.0000E+00 0.0000E+00 4.3491E-05 -7.7987E-06 3.8908E-05 -8.2119E-06 -7.8231E-06 -3.6502E-06 POWER OUT OF BRANCH ACTIVE REACTIVE 1.0655E-04 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 POWER OUT ACTIVE 6.5147E-01 1.0001E+00 0.0000E+00 0.0000E+00 0.0000E+00 2.0303E-01 1.9278E-01 2.3718E-01 3.9702E-01 5.7325E-01 1.6281E-01 OF BRANCH REACTIVE 3.2904E-01 4.7695E-01 0.0000E+00 0.0000E+00 0.0000E+00 7.9393E-02 1.0175E-01 7.3976E-02 1.2060E-01 2.3701E-01 2.6020E-02