You are on page 1of 22

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 B4 B5 B6

Nx = Node x
Bx = Branch x 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

Col. Data Line


NUMBER OF MUTUAL REACTANCES ( 500, usually 0) 1
LAST NODE NUMBER 11
LAST BRANCH NUMBER 21
MAX. NUMBER OF ITERATIONS (  20, 1 if direct solution) 31 2
MAX. CHANGE OF VOLTAGE BETWEEN ITERATIONS (  0.0001 pu) 41
RELAXATION FACTOR (  1) 51
FREQUENCY *1 61
BASE 3-PHASE POWER, MVA *2 71

*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 Col. Data Line


BRANCH NUMBER 1
CODE 11 2
BUS, NODE NUMBER 21 bus
ABS. VALUE OF U, specified 31
ANGLE OF U, degrees, specified (usually 0) 41
Voltage source with specified U and P U
BRANCH NUMBER 1
CODE 11 3
BUS, NODE NUMBER 21 node 1
ABS. VALUE OF U, specified 31
ANGLE OF U, degrees, initial (often 0) 41
ACTIVE POWER P, specified 51
Specified U, P, Q-MIN, Q-MAX
BRANCH NUMBER 1
CODE 11 12
BUS, NODE NUMBER 21
ABS. VALUE OF U, specified * 31
ANGLE OF U, degrees, initial (often 0) 41
ACTIVE POWER P, specified 51
REACTIVE POWER Q, initial 61 U
Q-MIN, specified 71 bus
Q-MAX, specified 1
Specified P, Q I
BRANCH NUMBER 1
CODE 11 13
BUS, NODE NUMBER 21 node 1
ABS. VALUE OF U, initial 31
ANGLE OF U, degrees, initial (often 0) 41
ACTIVE POWER P, specified 51
REACTIVE POWER Q, specified 61
Specified U, Q-MIN, Q-MAX, active power interchange
BRANCH NUMBER 1
CODE 11 14
BUS, NODE NUMBER 21
ABS. VALUE OF U, specified * 31
ANGLE OF U, degrees, initial (often 0) 41
ACTIVE POWER P, initial 51
REACTIVE POWER Q, initial 61
Q-MIN, specified 71
Q-MAX, specified 1
ACTIVE POWER INTERCHANGE 11 U
INTO = 1, OUT OF = 2 21 bus
BRANCH NUMBER (transmission line or cable) 31
Specified Q, active power interchange I
BRANCH NUMBER 1
CODE 11 15
BUS, NODE NUMBER 21 node 1
ABS. VALUE OF U, initial 31
ANGLE OF U, degrees, initial (often 0) 41
ACTIVE POWER P, initial 51
REACTIVE POWER Q, specified 61
ACTIVE POWER INTERCHANGE 71
INTO = 1, OUT OF = 2 1
BRANCH NUMBER (transmission line or cable) 11

* The specified voltage is conditional on the reactive power staying within specified limits.
AC CIRCUIT ANALYSIS PROGRAM ACCAN INPUT SHEET 4

Generation, cont.

Specified P, reactive power interchange Col. Data Line


BRANCH NUMBER 1
CODE 11 16
BUS, NODE NUMBER 21 U
ABS. VALUE OF U, initial 31 bus
ANGLE OF U, degrees, initial (often 0) 41
ACTIVE POWER P, specified 51 I
REACTIVE POWER Q, initial 61
REACTIVE POWER INTERCHANGE 71
INTO = 1, OUT OF = 2 1 node 1
BRANCH NUMBER (transmission line or cable) 11
Specified P, Q-MIN, Q-MAX, U in adjacent node
BRANCH NUMBER, GENERATOR 1
CODE 11 17 adjacent node
BUS, NODE NUMBER 21
ABS. VALUE OF U, adjacent node, specified *1 31 low impedance
IN ADJACENT NODE NUMBER 41
ABS. VALUE OF U, GENERATOR BUS, initial 51 bus
ANGLE OF U, GENERATOR BUS, DEGREES, initial 61
ACTIVE POWER P, specified 71 I
REACTIVE POWER Q, initial 1
Q-MIN, specified 11
Q-MAX, specified 21 node 1
Specified U in adjacent node, U = U0 + coeff. * ABS(I)
BRANCH NUMBER, GENERATOR (with current I) 1 adjacent node
CODE 11 18
BUS, NODE NUMBER 21
ADJACENT NODE NUMBER 31
ABS. VALUE OF CONSTANT VOLTAGE U0 41 bus
ANGLE OF U0, DEGREES (often zero) *2 51
COEFFICIENT (can be negative) 61 I
U-LIM (upper or lower limit) 71

Load node 1

Specified impedance
BRANCH NUMBER 1
CODE 11 21
BUS, NODE NUMBER 21
RESISTANCE 31 bus
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 node 1
RESISTANCE 31
REACTANCE (negative if capacitive) 41
BASE LINE VOLTAGE, KV 51
ACTIVE = 1, DISCONNECTED = 0 61

*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 U 0 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 bus
CODE 11 23
BUS, NODE NUMBER 21
ABS. VALUE OF U, INITIAL 31 I
ANGLE OF U, degrees, initial (often 0) 41
ACTIVE POWER P, specified 51
REACTIVE POWER Q, specified (neg. if capacitive) 61 node 1
Specified series resistance, inductance and capacitance, to be converted to ohms by the program.
BRANCH NUMBER 1 bus
CODE 11 24
BUS, NODE NUMBER 21
RESISTANCE 31
INDUCTANCE, mH 41
CAPACITANCE, F 51
ACTIVE = 1, DISCONNECTED = 0 61 node 1
Specified series impedance
BRANCH NUMBER 1 first node
CODE 11 25
FIRST NODE NUMBER 21
LAST NODE NUMBER 31
RESISTANCE 41
REACTANCE (negative if capacitive) 51
ACTIVE = 1, DISCONNECTED = 0 61 last node
Specified P and Q in series impedance
BRANCH NUMBER 1
CODE 11 26 first node
FIRST NODE NUMBER 21
LAST NODE NUMBER 31 I
ABS. VALUE OF U, INITIAL (difference between nodes) 41
ANGLE OF U, degrees, initial (often 0) 51
ACTIVE POWER P, specified 61 last node
REACTIVE POWER Q, specified (negative if capacitive) 71

Shunt reactors/capacitors

Specified reactance
BRANCH NUMBER 1
CODE 11 31
BUS, NODE NUMBER 21 bus
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 node 1
REACTANCE (negative if capacitive) 31
BASE LINE VOLTAGE, KV 41
ACTIVE = 1, DISCONNECTED = 0 51
Specified U, Q-MIN, Q-MAX
BRANCH NUMBER 1 bus
CODE 11 33
BUS, NODE NUMBER 21 I
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.
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. node 1
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

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 Line
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 U
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 I
FIRST NODE NUMBER 21
LAST NODE NUMBER 31
BRANCH NUMBER, CURRENT SOURCE 41 node 1
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 Zeros if
MAX. NUMBER OF STEPS, NEGATIVE DIRECTION 11 discon-
POSITIVE DIRECTION 21 nected
AC CIRCUIT ANALYSIS PROGRAM ACCAN INPUT SHEET 8

Voltage sources

Specified U Col. Data Line


BRANCH NUMBER 1
CODE 11 1
FIRST NODE NUMBER 21
LAST NODE NUMBER 31
ABS. VALUE OF U, specified 41
ANGLE OF U, degrees, specified 51
Linear function
BRANCH NUMBER 1
CODE 11 9 First node
FIRST NODE NUMBER 21
LAST NODE NUMBER 31
U = COEFFICIENT 41 U
TIMES VALUE OF VARIABLE NO. 51
+ COEFFICIENT 61
TIMES VALUE OF VARIABLE NO. 71 Last node
Function, programmed by user (see user's manual)
BRANCH NUMBER 1
CODE 11 10
FIRST NODE NUMBER 21
LAST NODE NUMBER 31

Current sources

Specified I
BRANCH NUMBER 1
CODE 11 11
FIRST NODE NUMBER 21
LAST NODE NUMBER 31
ABS. VALUE OF I, specified 41
ANGLE OF I, degrees, specified 51
Linear function
BRANCH NUMBER 1
CODE 11 19 First node
FIRST NODE NUMBER 21
LAST NODE NUMBER 31
I = COEFFICIENT 41 I
TIMES VALUE OF VARIABLE NO. 51
+ COEFFICIENT 61
TIMES VALUE OF VARIABLE NO. 71 Last node
Function, programmed by user (see user's manual)
BRANCH NUMBER 1
CODE 11 20
FIRST NODE NUMBER 21
LAST NODE NUMBER 31
- 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 NxN1 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 5 20 100 20 0
NODE 5 65 100 65 2
SOURCE 5 20 5 65 3 1
LR 40 20 40 65 4 -1
LR 70 20 70 65 5 -1
LR 100 20 100 65 6 -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 70 105 195 160 2 7 0 0


WHITE
BUS 70 120 155 85 3 0 10 0
RED
BUS 0 50 80 25 4 8 0 0
GREEN
BUS 145 170 195 25 5 0 11 0
BLUE
BUS 0 50 80 105 6 0 9 0
YELLOW
TRAN 75 160 75 105 2 6 12 12 0 0
TRAN 150 160 150 85 2 3 13 13 0 0
TRAN 190 160 190 25 2 5 14 14 0 0
TRAN 5 25 5 105 4 6 15 15 0 0
TRAN 75 25 75 85 4 3 16 16 0 0
TRAN 150 85 150 25 3 5 17 17 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

SUBROUTINE NODE(X1,Y1,X2,Y2,IN)
C --- DRAWS NODE AS HORIZONTAL LINE FOR Y1=Y2 OR VERTICAL LINE FOR X1=X2
C --- BETWEEN X1,Y1 AND X2,Y2.
C --- IN IS THE VARIABLE NUMBER FOR THE NODE POTENTIAL (CAN BE ZERO).
C --- IF IN=0, THE SUBROUTINE SIMPLY DRAWS A HORIZONTAL OR VERTICAL LINE.

SUBROUTINE SOURCE(X1,Y1,X2,Y2,IN,IARR)
C --- DRAWS SOURCE HORIZONTALLY FOR Y1=Y2 OR VERTICALLY FOR X1=X2
C --- BETWEEN X1,Y1 AND X2,Y2.
C --- IN IS THE BRANCH NUMBER (VARIABLE NOT DRAWN IF IN=0).
C --- IARR=1 MEANS ARROW POINTING RIGHT OR UP, IARR=-1 LEFT OR DOWN.
C --- IARR MUST CORRESPOND WITH THE POSITIVE DIRECTION OF THE VARIABLE.

SUBROUTINE LR(X1,Y1,X2,Y2,IN,IARR) OR RL(X1,Y1,X2,Y2,IN,IARR)


C --- DRAWS INDUCTOR, RESISTOR AND ARROW HORIZONTALLY IF Y1=Y2,
C --- VERTICALLY IF X1=X2, BETWEEN X1,Y1 AND X2,Y2.
C --- IN IS THE VARIABLE NUMBER FOR THE CURRENT (IN AND IARR CAN BE ZERO).
C --- IARR=1 MEANS ARROW POINTING RIGHT OR UP, IARR=-1 LEFT OR DOWN.
C --- IARR MUST CORRESPOND WITH THE POSITIVE DIRECTION OF THE CURRENT.
C --- THE LENGTH BETWEEN X1,Y1 AND X2,Y2 MUST BE >= 55 MM IF THE BRANCH
C --- IS HORIZONTAL, 45 MM IF IT IS VERTICAL.

SUBROUTINE R(X1,Y1,X2,Y2,IN,IARR)
C --- DRAWS RESISTOR AND ARROW HORIZONTALLY IF Y1=Y2,
C --- VERTICALLY IF X1=X2, BETWEEN X1,Y1 AND X2,Y2.
C --- IN IS THE VARIABLE NUMBER FOR THE CURRENT (IN AND IARR CAN BE ZERO).
C --- IARR=1 MEANS ARROW POINTING RIGHT OR UP, IARR=-1 LEFT OR DOWN.
C --- IARR MUST CORRESPOND WITH THE POSITIVE DIRECTION OF THE CURRENT.
C --- THE LENGTH BETWEEN X1,Y1 AND X2,Y2 MUST BE >= 40 MM IF THE BRANCH
C --- IS HORIZONTAL, 30 MM IF IT IS VERTICAL.

SUBROUTINE L(X1,Y1,X2,Y2,IN,IARR)
C --- DRAWS INDUCTOR AND ARROW HORIZONTALLY IF Y1=Y2,
C --- VERTICALLY IF X1=X2, BETWEEN X1,Y1 AND X2,Y2.
C --- IN IS THE VARIABLE NUMBER FOR THE CURRENT (IN AND IARR CAN BE ZERO).
C --- IARR=1 MEANS ARROW POINTING RIGHT OR UP, IARR=-1 LEFT OR DOWN.
C --- IARR MUST CORRESPOND WITH THE POSITIVE DIRECTION OF THE CURRENT.
C --- THE LENGTH BETWEEN X1,Y1 AND X2,Y2 MUST BE >= 40 MM IF THE BRANCH
C --- IS HORIZONTAL, 30 MM IF IT IS VERTICAL.

SUBROUTINE C(X1,Y1,X2,Y2,IN,IARR)
C --- DRAWS CAPACITOR AND ARROW HORIZONTALLY IF Y1=Y2,
C --- VERTICALLY IF X1=X2, BETWEEN X1,Y1 AND X2,Y2.
C --- IN IS THE VARIABLE NUMBER FOR THE CURRENT (IN AND IARR CAN BE ZERO).
C --- IARR=1 MEANS ARROW POINTING RIGHT OR UP, IARR=-1 LEFT OR DOWN.
C --- IARR MUST CORRESPOND WITH THE POSITIVE DIRECTION OF THE CURRENT.
C --- THE LENGTH BETWEEN X1,Y1 AND X2,Y2 MUST BE >= 32 MM IF THE BRANCH
C --- 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)


C --- DRAWS RESISTOR, CAPACITOR AND ARROW HORIZONTALLY IF Y1=Y2,
C --- VERTICALLY IF X1=X2, BETWEEN X1,Y1 AND X2,Y2.
C --- IN IS THE VARIABLE NUMBER FOR THE CURRENT (IN AND IARR CAN BE ZERO).
C --- IARR=1 MEANS ARROW POINTING RIGHT OR UP, IARR=-1 LEFT OR DOWN.
C --- IARR MUST CORRESPOND WITH THE POSITIVE DIRECTION OF THE CURRENT.
C --- THE LENGTH BETWEEN X1,Y1 AND X2,Y2 MUST BE >= 47 MM IF THE BRANCH
C --- IS HORIZONTAL, 37 MM IF IT IS VERTICAL.

SUBROUTINE BUS(XL,XC,XR,Y,IN,IG,IL,IR)
C --- DRAWS BUS AS A HORIZONTAL LINE BETWEEN XL,Y AND XR,Y WITH
C --- GENERATION ABOVE BETWEEN XC-9,Y AND XC+9,Y+22.5 AND
C --- LOAD BELOW BETWEEN XC-9,Y-22.5 AND XC+9,Y.
C --- VARIABLE NUMBERS ARE:
C --- IN: NODE POTENTIAL
C --- IG: GENERATOR CURRENT
C --- IL: LOAD CURRENT
C --- IR: CURRENT, SHUNT REACTOR OR CAPACITOR (ZERO IF NONE)

SUBROUTINE TRAN(X1,Y1,X2,Y2,IF,IL,ITF,ITL,I1,I2)
C --- DRAWS TRANSMISSION LINE AS A VERTICAL OR SLANTED LINE BETWEEN
C --- X1,Y1 AND X2,Y2. MAX SLANT 30 DEGREES WITH VERTICAL.
C --- VARIABLE NUMBERS ARE:
C --- IF: VOLTAGE, FIRST BUS (AT X1,Y1)
C --- IL: VOLTAGE, LAST BUS (AT X2,Y2)
C --- ITF: CURRENT INTO LINE
C --- ITL: CURRENT OUT OF LINE
C --- I1: CURRENT, SHUNT REACTOR OR CAPACITOR AT X1,Y1 (ZERO IF NONE)
C --- 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)
C --- DRAWS TRANSMISSION LINE WITH TWO WINDING TRANSFORMER AS A
C --- VERTICAL OR SLANTED LINE BETWEEN X1,Y1 AND X2,Y2.
C --- VARIABLE NUMBERS ARE:
C --- IF: VOLTAGE, FIRST BUS (AT X1,Y1)
C --- IL: VOLTAGE, LAST BUS (AT X2,Y2)
C --- ITF: CURRENT INTO LINE
C --- ITL: CURRENT OUT OF LINE
C --- I1: CURRENT, SHUNT REACTOR OR CAPACITOR AT X1,Y1 (ZERO IF NONE)
C --- I2: CURRENT, SHUNT REACTOR OR CAPACITOR AT X2,Y2 (ZERO IF NONE)
C --- I3: VOLTAGE BEFORE TRANSFORMER
C --- I4: VOLTAGE AFTER TRANSFORMER
- 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 0.000

FIRST BRANCH NO. SECOND BRANCH NO. MUTUAL REACTANCE


4 5 0.603900
4 6 0.523400
5 6 0.606100

BRANCH CODE NODE OTHER INPUT DATA


3 11 1 2.000E+00 5.770E+02 0.000E+00
4 21 2 2.950E-02 7.638E-01 1.000E+00
5 21 2 2.720E-02 6.779E-01 1.000E+00
6 21 2 2.920E-02 7.561E-01 1.000E+00

ITERATION NO. MAX. CHANGE OF VOLTAGE


1 363.203400

ACTIVE POWER REACTIVE POWER


GENERATION 0.0000E+00 0.0000E+00
LOAD 3.1767E+03 2.0954E+05
TRANSMISSION 0.0000E+00 0.0000E+00
SHUNT REACTORS/CAPACITORS 0.0000E+00 0.0000E+00

VOLTAGE
NODE NO. ABS. VALUE ANGLE, DEG. REAL COMP. IMAG. COMP.
1 0.000000 0.0000 0.000000 0.000000
2 363.203400 89.1315 5.505490 363.161682

CURRENT POWER INTO BRANCH POWER OUT OF BRANCH


BRANCH NO. ABS. VALUE ANGLE, DEG. REAL COMP. IMAG. COMP. ACTIVE REACTIVE ACTIVE REACTIVE
3 577.000000 0.0000 577.000000 0.000000 0.0000E+00 0.0000E+00 3.1767E+03 2.0954E+05
4 189.226135 0.4083 189.221329 1.348558 1.5315E+03 6.8711E+04 0.0000E+00 0.0000E+00
5 194.202057 -0.9077 194.177689 -3.076461 -4.8209E+01 7.0535E+04 0.0000E+00 0.0000E+00
6 193.608704 0.5114 193.600998 1.727903 1.6934E+03 7.0299E+04 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 0.000

BRANCH CODE NODE OTHER INPUT DATA


7 2 2 1.020E+00 0.000E+00
8 12 4 1.040E+00 0.000E+00 1.000E+00 3.000E-01 0.000E+00 1.000E+00
9 23 6 1.000E+00 0.000E+00 6.000E-01 2.000E-01
10 23 3 1.000E+00 0.000E+00 6.000E-01 3.000E-01
11 23 5 1.000E+00 0.000E+00 4.000E-01 1.000E-01
12 41 2 6.000E+00 5.000E-02 2.000E-01 1.000E+00
13 41 2 3.000E+00 1.000E-01 4.000E-01 1.000E+00
14 41 2 5.000E+00 1.500E-01 6.000E-01 1.000E+00
15 41 4 6.000E+00 5.000E-02 2.000E-01 1.000E+00
16 41 4 3.000E+00 5.000E-02 2.000E-01 1.000E+00
17 41 3 5.000E+00 1.000E-01 4.000E-01 1.000E+00

ITERATION NO. MAX. CHANGE OF VOLTAGE


1 1.024774
2 0.019740
3 0.016223
4 0.010769
5 0.000853
6 0.000073

THE SOLUTION CONVERGED TO THE SPECIFIED MAXIMUM CHANGE OF VOLTAGE

ACTIVE POWER REACTIVE POWER


GENERATION 1.6516E+00 8.0598E-01
LOAD 1.6001E+00 5.9998E-01
TRANSMISSION 5.1501E-02 2.0600E-01
SHUNT REACTORS/CAPACITORS 0.0000E+00 0.0000E+00

VOLTAGE
NODE NO. ABS. VALUE ANGLE, DEG. REAL COMP. IMAG. COMP.
1 0.000000 0.0000 0.000000 0.000000
2 1.020000 0.0000 1.020000 0.000000
3 0.954768 -3.9412 0.952510 -0.065625
4 1.040025 2.0010 1.039391 0.036315
5 0.923464 -8.0075 0.914460 -0.128641
6 0.993123 -2.0726 0.992473 -0.035917

CURRENT POWER INTO BRANCH POWER OUT OF BRANCH


BRANCH NO. ABS. VALUE ANGLE, DEG. REAL COMP. IMAG. COMP. ACTIVE REACTIVE ACTIVE REACTIVE
7 0.715537 -26.7970 0.638695 -0.322586 0.0000E+00 0.0000E+00 6.5147E-01 3.2904E-01
8 1.065370 -23.4952 0.977044 -0.424734 0.0000E+00 0.0000E+00 1.0001E+00 4.7695E-01
9 0.636874 -20.5056 0.596521 -0.223097 6.0004E-01 1.9999E-01 0.0000E+00 0.0000E+00
10 0.702633 -30.5042 0.605383 -0.356657 6.0004E-01 2.9999E-01 0.0000E+00 0.0000E+00
11 0.446473 -22.0435 0.413836 -0.167566 3.9999E-01 9.9996E-02 0.0000E+00 0.0000E+00
12 0.219506 -23.4307 0.201406 -0.087284 2.0543E-01 8.9030E-02 2.0303E-01 7.9393E-02
13 0.228312 -31.7665 0.194111 -0.120197 1.9799E-01 1.2260E-01 1.9278E-01 1.0175E-01
14 0.269045 -25.3299 0.243179 -0.115105 2.4804E-01 1.1741E-01 2.3718E-01 7.3976E-02
15 0.417804 -18.9693 0.395115 -0.135812 4.0575E-01 1.5551E-01 3.9702E-01 1.2060E-01
16 0.649706 -26.4039 0.581930 -0.288922 5.9436E-01 3.2144E-01 5.7325E-01 2.3701E-01
17 0.178539 -17.0878 0.170657 -0.052461 1.6600E-01 3.8770E-02 1.6281E-01 2.6020E-02

DEVIATIONS FROM SPECIFIED VOLTAGE

NODE NO. VOLTAGE DEVIATION


2 0.000000
4 0.000025

DEVIATIONS FROM SPECIFIED POWER

DEVIATION, POWER INTO BRANCH POWER OUT OF BRANCH


BRANCH NO. ACTIVE REACTIVE ACTIVE REACTIVE
8 0.0000E+00 0.0000E+00 1.0655E-04 0.0000E+00
9 4.3491E-05 -7.7987E-06 0.0000E+00 0.0000E+00
10 3.8908E-05 -8.2119E-06 0.0000E+00 0.0000E+00
11 -7.8231E-06 -3.6502E-06 0.0000E+00 0.0000E+00

You might also like