Sie sind auf Seite 1von 99

A

PROJECT REPORT
ON

VISUALIZATION OF EQUAL AREA CRITERION


USING JAVA APPLET
Conducted at
I.I.T. Mumbai
Submitted in partial fulfillment of the requirements for degree of

BACHELOR OF ELECTRICAL ENGINEERING


(UNIVERSITY OF MUMBAI)
Prepared by
PRAKASH NAIR
BHUPENDRA AMODEKAR
ROHIT BHUTE
ANWESH DAS

Department of Electrical Engineering


Sardar Patel College of Engineering
Munshi Nagar, Andheri (West),
Mumbai - 400058

CERTIFICATE
THIS TO CERTIFY THAT
AMODEKAR BHUPENDRA VASANT
BHUTE ROHIT V.
DAS ANWESH
NAIR PRAKASH

SEAT NO: 2912


SEAT NO: 2915
SEAT NO: 2917
SEAT NO: 2906

HAVE PRESENTED A PROJECT ENTITILED

VISUALIZATION OF EQUAL AREA CRITERION


USING JAVA APPLET
AND THE SAME IS APPROVED FOR THE DEGREE OF
BACHELOR OF ELECTRICAL ENGINEERING
UNIVERSITY OF MUMBAI
_______________

_______________

Internal Guide

External Guide

_______________

_______________

Internal Examiner

External Examiner
_______________

Head of Department

ABSTRACT
This project presents a cross-platform application which provides a better comprehension of
power system stability using equal area criterion. A distinctive feature of this application is
interactive plotting of power angle curves with on-line parameter adjustment showing
accelerating/decelerating areas, operating and clearing angles, stability margins, etc. It
computes the critical clearing angle (CCA) and other stability parameters. It provides the user
with a choice to select the computational method and its step size for calculating the solution
to the swing equation. Some scenarios that are used to illustrate equal area criteria are sudden
change in mechanical input sudden short circuit on one of the parallel lines (3-symmetrical
fault). This application concentrates on the second scenario, and handles lossless lines and
three phase symmetrical faults. Thus, the objective is to develop an interactive graphical applet
for the analysis of single-machine Infinite-Bus (SMIB) power system transient stability using
Equal Area Criteria (EAC).

ACKNOWLEDGEMENT
While most project groups will consider themselves lucky to have one project guide, we were
extremely lucky to have two. We thank Prof. S. M. Pandit of Sardar Patel College of
Engineering who was our project guide and Prof. S. A. Soman of I.I.T. Mumbai who was our
external project supervisor. We are particularly indebted to our guide Prof. S. M. Pandit who
gave us complete freedom in choosing the project topic. We extend our thanks to I.I.T.
Mumbai and Prof. S. A. Soman, Prof. A. M. Kulkarni for giving us the chance to work on this
project . We are extremely grateful to Mr.Rajeev Gajbhiye (PhD Student , electrical
department , I.I.T. Mumbai) who helped us in this project. We wish to thank the staff of
S.P.C.E. for allowing us to use the resources of the college while working on the project. We
are also grateful to our classmate, Amey Kulkarni, who helped us test the software and locate
its bugs.

Table of Contents

Abstract

03

Acknowledgement

04

Table of Contents

05

List of Figures

06

1. Introduction

08

2. Dynamics of Synchronous Machine and Swing Equation

10

3. Transient Stabiltiy

15

4. Numerical Techniques for Solution of Swing Equation

18

5. Equal Area Criterion

35

6. Application of EAC to SMIB

38

7. Factors affecting Power System Stability

45

8. Java and Applets

48

9. The PSS Applet

50

10. Conclusion and Scope for further development

62

11. Bibliography

64

12. Appendix 1 PowerSystem class code

65

13. Appendix 2 PowerSystem class documentation

75

14. Appendix 3 General Public License

88

List of Figures
Figure 2.1 : Single machine infinite bus system
Figure 2.2 : Flow of mechanical & electrical power in a synchronous machine
Figure 4.1 : Actual and assumed values of Pa , , d as a function of time
Figure 4.2 : Flowchart of point - by - point method
Figure 4.3 : Plot of x vs. t (Eulers method)
Figure 4.4 : Flowchart for Eulers method
Figure 4.5 : Plot of x vs. t (Modified Eulers method)
Figure 4.6 : Flowchart for Modified Euler method
Figure 4.7 : Plot of x vs. y (RK 4th order method)
Figure 4.8 : Flowchart of RK4 method
Figure 5.1 : Plot of d vs t for stable & unstable systems
Figure 5.2 : Single machine connected to infinite bus through two parallel lines
Figure 5.3 : Illustration of equal area criterion
Figure 6.1 : Single machine connected to infinite bus through two parallel lines
Figure 6.2 : Single machine connected to infinite bus through one bus
Figure 6.3 : Illustration equal area criterion for the opening of one of the line
Figure 6.4 (a)&(b): Short circuit at one end of the line
Figure 6.5 : Equal area criterion illustrated
Figure 6.6 (a),(b)&(c) Simplification of circuit using delta-star & star-delta conversion
Figure 6.7 : Equal area criterion applied to fault on middle of one line of the system
Figure 6.8 : Fault on middle of one line of the system case of critical clearing angle
Figure 9.1 : MVC architecture
Figure 9.2 : Actual MVC architecture
Figure 9.3 : Main flowchart
Figure 9.4 : Help menu
6

Figure 9.5 : Input Parameters


Figure 9.6 : Input parameters explanation
Figure 9.7 : Single machine tied to infinite bus as displayed in applet
Figure 9.8 : Model with flashing CBs
Figure 9.9 : Calculated Output
Figure 9.10 : Output Explained
Figure 9.11 : Plot of d vs. t for stable & unstable systems
Figure 9.12 : EAC Plot for stable system & unstable system
Figure 9.13 : Help menu which describes plots in detail
Figure 9.14 : Error mesages
Figure 9.15 : Snapshot before submission of data
Figure 9.16 : Snapshot on submission of valid data

Introduction
Power system stability may be defined as that property of a system that enables the
synchronous machines in the system to respond to a disturbance and return to normal
operating conditions.
Depending upon the magnitude and nature of the disturbance , stability studies are often
classified into the three following categories steady state , dynamic and transient stability
studies .
The difference between the steady state and dynamic stability studies is the degree of detail
used to model the machines . In dynamic stability studies , the excitation system and the
turbine governor systems are represented along with synchronous machine models . On the
other hand , steady state stability problems use a very simple generator model , which treats
the generator as a constant voltage source . However , both of the above mentioned stability
studies cover the case of system reaction to relatively small disturbances . This allows the
linearization of the non-linear differential and algebraic equations arising from a study of the
system .
Transient stability studies differ from the other two categories in the fact that it covers the case
of severe disturbances to the system , such as transmission system faults , sudden load changes
and loss of generating units or line switching . Transient stability studies are much more
commonly carried out thereby reflecting their greater importance in practice . Also , since the
disturbances are large , the aforementioned linearization of the differential equations cannot be
used . Thus , numerical methods are to be used for the solution of these systems . Transient
stability studies can be further subdivided into two categories first swing and multi-swing
stability problems .
First swing stability is based on a simple generator model without representation of control
systems whereas multi-swing stability study , which extends over a longer period , must
consider effects of generator control systems .
8

Thus we begin the analysis of Single Machine Infinite Bus (SMIB) system in the next chapter .

2.Dynamics of Synchronous Machine and Swing Equation


Dynamics of synchronous machine :
Dynamics or kinetics is the study of the motion of a body under the action of one or several
forces . In this section , we analyse the motion of the rotor and derive a correlation between the
machine rating and it's basic property of inertia.
Figure 2.1 shows a single machine infinite bus system . The machine rating is G , and an input
power of Pm is fed to it by the prime mover .

Figure 2.1 : Single machine infinite bus system

The kinetic energy of the rotor at synchronous speed is


K.E. = ()*J*sm2
where
J = rotor moment of inertia kg-m2
sm = synchronous speed in rad(mech)/sec.
But
s = *P*sm = rotor speed in rad(elect)/sec
where
P = number of machine poles
Thus,
K.E. = * {J*(2/P)2 * s * 10-6} * s
10

........... (1)

= *M*s
where
M = J * (2/P)2 * s*10-6
= moment of inertia in MJ-s/elect rad.
Now we shall define the inertia constant H such that
GH = K.E. = ()*M*s MJ [5]
where
G = machine rating (base) in MVA (3phase)
H = inertia constant in MJ/MVA.
It immediately follows that
M = (2*GH)/s = GH/(f) MJ-s/elect rad
Taking G as base, inertia constant in p.u. is
M (pu) = H/(f)
= H/(180*f)

s2/elect rad
s2/elect degree

Swing Equation :

Figure 2.1 : Flow of mechanical & electrical power in a synchronous machine[5]


11

Figure 2.1 shows the torque , speed and flow of mechanical and electrical powers in a
synchronous machine . It is assumed that the windage , friction and iron loss torque is
negligible .
The equation governing the motion of rotor of a synchronous machine is based on the
elementary principle in dynamics which states that accelerating torque is a product of the
moment of inertia of rotor and its angular acceleration . This is basically Newton's second law
applied to rotational motion .
J(d2m/dt2) = Tm Te

........... (2)

where
J = total moment of inertia of rotor masses in kg-m2
m = the angular displacement of rotor with respect to stationary axis in mechanical
radians
t = time in seconds
Tm = the mechanical or shaft torque supplied by the prime mover after deducting the
retarding torque due to rotational losses in Nm
Te = the net electrical torque Nm
While the dynamics of the machine rotor is governed by equation (2) , the actual change in
speed for very small amounts of time (of the order used for transient stability studies) , is not
significant . Thus , the speed for the period of the transient operation can be assumed to be the
synchronous speed , sm. Hence , equation (1) can be converted into the more convenient
power form by multiplying both sides by sm
sm * J(d2m/dt2)*10-6 = Pm Pe

........... (3)

where
Pm : mechanical power input in MW
Pe : electrical power output in MW(stator Cu loss is assumed negligible)

12

Since
m = (2/P)*e
where
e = angle in rad(elect)
Thus , we have
d2m/dt2 = (2/P)* d2e/dt2
Using the above result and equation (1), we can rewrite equation (3) as
{J*(2/P)2 * s*10-6}* (d2e/dt2) = Pm Pe
or
M * (d2e/dt2) = Pm Pe

........... (4)

Since synchronism is a key element in the operation of a synchronous machine , it is


convenient to measure the angular position of rotor with respect to synchronously rotating
frame of reference . Let
= e s *t

........... (5)

be rotor angular displacement from synchronously rotating reference frame (called torque
angle /power angle)
From above equation
d2e/dt2 = d2/dt2
Hence equation (4) can be written in terms of as
M *(d2 /dt2) = Pm Pe MW

13

With M defined earlier this can be further simplified as


(GH/f)*(d2 /dt2) = Pm Pe MW
Dividing above expression by G we can write
(H/f)*(d2/dt2) = Pm Pe = Pa (pu)
where
H/f = M (pu)
and
Pa = accelerating power , which is the power being fed to the rotor above what it is
supplying to the load. This power is used by the rotor to accelerate.
We have [5]
M*(d2/dt2) = Pm Pe = Pa

........... (6)

The above 2nd order nonlinear differential equation defines dynamic behavior of rotor and is
known as the swing equation .
The swing equation, as derived above is a key to understanding rotor dynamics for any kind of
stability studies . Following chapter discusses how we shall apply the swing equation for
transient stability study .

14

3. Transient stability
From equation (6) , as obtained in the last chapter , we see that the dynamics of a single
synchronous machine connected to infinite bus bar is governed by the equation
M(d2/dt2) = Pm Pe
Pe can be represented as
Pe = Pmax* sin [5]
where Pmax is a function of the generator and infinite bus voltages and the effective
impedance between them. Thus , the swing equation becomes
M(d2/dt2) = Pm Pmax*sin
A direct solution of this equation is very difficult to achieve . For small disturbances , as is
covered in steady state stability studies , it is possible to linearize the equation . This allows us
to obtain a condition , satisfaction of which ensures the stability of the system . Such a
simplistic approach is not applicable to the solution of swing equation for large disturbances as
in the case of transient stability . The method of solution is more involved . It requires use of
such tools such as numerical techniques to approximate the non-linear system to a discrete
form with arbitrarily close approximation . Thus , the general approach we use consists of
taking into account the disturbances in the system and solving the equation in the presence of
said disturbances .
First , in accounting for the disturbances in the system , we need to construct a mathematical
model of the system which will consist of the parameters affecting the dynamic behavior of
the machine . The complexity of the model depends upon the type of transient , system and the
accuracy required . The factors that should be kept in mind for constructing the model are as
follows
15

1. The network before , during and after transient .


2. The loads and their characteristics .
3. The parameters of the synchronous machines .
4. The mechanical turbine and the speed governor .
5. Other supplementary controls, like tie-line controls are necessary for a mathematical
description of the system .
Thus , for the solution of the swing equation , we need information about the steady state of
the system prior to the occurrence of the disturbance and the mathematical model of the
system .
Generally , a factor affecting the dynamics of the system is represented by a differential
equation . For simplifying the analysis without significant loss of accuracy , we make the
following assumptions [5]
1. Transmission lines and synchronous machine resistance is ignored, thus inherent
damping has been neglected, giving pessimistic results .
2. Damping term contributed by synchronous machine damper winding has been ignored.
3. Rotor speed is assumed to be synchronous. In fact, it varies insignificantly during the
course of the transient .
4. Mechanical input is assumed to be constant during transient, which means the
regulating action of governor loop is ignored .
5. Voltage behind transient reactance is assumed to be constant , that is , action of voltage
regulating loop is ignored .
The basic outline of steps to be followed for stability studies is as
1. From prefault loading, determine the voltage behind transient reactance and the torque
angle 0 of the machine with reference to the infinite bus .
2. For specified fault, determine the power transfer equation P() during fault .

16

3. From the swing equation starting with 0 as obtained in step 1 , calculate as a function
of time using a numerical technique for solving the non linear differential equation .
4. After clearance of the fault once again determine P() and solve further for (t) .
5. After transmission line is switched on (reclosure) , again find Pe() and continue to
calculate (t) .
6. If (t) goes through a maximum value and starts to reduce , the system is regarded as
stable. It is unstable if (t) continues to increase . Calculation is ceased after suitable
period of time .
In the following chapter , we discuss the numerical techniques that we have decided to use for
solution of the swing equation .

17

4. Numerical Techniques for Solution of Swing Equation


It is not possible to obtain an analytical solution of coupled non-linear differential equations .
Hence , we have used the numerical techniques mentioned earlier. These allow us to obtain a
reasonably accurate solution of the equations . Some of the commonly used numerical
techniques for this purpose are

Point by point method

Euler's method

Euler's modified method

Runge-Kutta method

Quantities Pa and r , are continuous function of time t but here we discretise the system in
order to implement them on digital system, therefore we make following assumption
1. The accelerating power Pa at the beginning of an interval is constant from middle of
the preceding interval to the middle of interval considered.
2. The angular velocity is constant throughout any interval at the value computed for the
middle of the interval.

Point - by - point method:


Point by point solution is also known as step-by-step solution . The following two steps are
carried out alternately
1. First , compute the angular position , and angular speed d/dt at the end of the time
interval using the formal solution of the swing equation from the knowledge of the
assumed value of the accelerating power and the values of and d/dt at the beginning
of the interval .
2. Then compute the accelerating power of each machine from the knowledge of the
angular position at the end of the interval as computed in step 1 .

18

Figure 4.1 : Actual and assumed values of Pa , , as a function of time[5]

19

Point by point method applied to Swing curve solution:


In this method, the accelerating power during the interval is assumed constant at its value
calculated for the middle of the interval . The pertaining diagrams have been depicted in figure
4.1 .
The desired formula for computing the change in during the nth time interval is
n =n-1 + {(t)2 /M} Pan-1
where
n = change in angle during the nth time interval
n-1 = change in angle during the (n-1)th time interval
t = length of time interval
Pan-1 = accelerating power at the beginning of the nth time interval
Due to occurence or clearance of faults , or some switching operations , discontinuities occur
in the accelerating power curve . These are accounted for by taking the effective value of
accelerating power . If the discontinuity occurs at the beginning of an interval , the average
value of the accelerating power at the ends of the interval is taken . Thus , in computing the
increment of angle occurring during first interval after a fault is applied at t=0 , the above
equation becomes
1 = {(t)2/M} * (Pa0+)/2
where Pa0+ is the accelerating power immediately after the occurrence of the fault .
If the fault is cleared at the beginning of the mth interval, then for this interval ,
Pa(m-1) = {Pa(m-1)- + Pa(m-1) +}/2
where Pa(m-1)- is the accelerating power before clearing and Pa(m-1)+ is that immediately after
clearing the fault . If the discontinuity occurs at the middle of the interval , no special
treatment is needed .
20

This is the most widely used way of solving the swing equation , but there are several other
numerical methods available to compute swing curve .
The flowchart for the process involved in point-by-point solution of the swing equation is
shown in figure 4.2.

21

Figure 4.2 : Flowchart of point - by - point method

22

Eulers method:
One of the simpler numerical integration techniques available , this is used for functions for
which the value of the gradient can be determined at any point .
This differs from the point-by-point method of solution in the fact that this belongs to the
Runge Kutta family of techniques . This uses the value of the slope of curve at a point to
approximate the next point . Hence , the discretization is not as explicit as point-by-point
method .
Consider a continuous and differentiable function x(t) , which has the function x'(t) defining
the gradient at t .

Figure 4.3 : Plot of x vs. t (Eulers method)[2]


At x1 , the value of the slope can be obtained as x'(t1) . Thus the approximate value of the
ordinate at the end of the time interval is
x2p = x1 + x'(t1)*h
[where h = t]
As can be seen from figure 4.3 , the non-linear graph has been approximated by a constant
slope. Thus, the approximation departs from the actual value . This introduces considerable
23

error in the approximation .


Eulers method applied to Swing curve solution :
For the solution of the swing curve , we assume the following initial conditions
0 = 0

0 = initial Pa = Pm Pmax*sin 0

For the nth iteration , the steps are


n = n-1 + t*(1/M)*Pa(n-1)
n = n-1 + t* n
Figure 4.4 shows the flowchart for the process of Euler's method applied to solution of swing
curve .

24

Figure 4.4 : Flowchart for Eulers method

25

Modified Euler method:


This is an improvement over the Euler's method for solution of the swing equation . Where the
Euler method used one slope for an approximation , this uses two values of the slopes , at the
beginning and the end of the time interval , to obtain a better approximation of the final value .
Consider a continuous and differentiable function x(t) of which the derivative is known as the
function x'(t) . Let the point (t1, x1) be known . The successive point (t2, x2) is evaluated using
modified Eulers method as follows
The step size is taken as t . At (t1, x1) , the value of the slope of the curve is x'(t1) . This is line
L1 in figure 4.5 . Now , by a simple approximation , the predicted value of x(t) at t = t2 is
xp = x1 + x'(t1)* t

Figure 4.5 : Plot of x vs. t (Modified Eulers method)[7]

At t = t2, x' = x'(t2). This is line L3 . Thus , we get the slopes at the beginning and the end of
26

the time interval . We take the corrected value of the slope in the time interval as an average of
the slope values at the ends .
Thus
xc = x + *(x'(t1) + x'(t2))* t
The corrected slope lies somewhere between the values of the other two as is represented by
line L2 . As can be seen in figure 4.5 , the error in the value of x(t) is reduced by this method .
Modified Eulers method applied to Swing curve solution:
Since we have to solve a coupled system of differential equations , it is necessary to break it
down to a system of two first order differential equations . We can do this by using the
property that the angular velocity is a derivative of the angular position .
Since , from equation (5) derived in chapter 2
de/dt = d/dt
Here , we take the equations as
d/dt =
d/dt = Pa/M
To get the composite equation
d2/dt2 = Pa/M
For this set of equations , at any point in the iterative solution , the following sequence of
operations take place [7]
p = + (Pa()/M)*t

27

p = + p*t
Thus , we get the predicted values of the functions after a time interval t . Now , we shall get
the values of the slope at the predicted values of the function
d/dt = p
[Note : We can omit the above step, since we already know the value of p]
d/dt = (Pa(p)/M)
Thus we have the slopes at the end of the time interval . Now , in one go we shall evaluate the
corrected values of and by averaging their slopes
c = + (1/2)*( + p)*t
c = + (1/2M)*(Pa() + Pa(p))*t
These values are updated values for the next iteration .
Note : Pa() is a designation that Pa is a function of the variable and that the value of has to
be substituted in the function to obtain the value of Pa . Similarly , Pa(p) denotes that the
value of p has to be substituted in the function to obtain its value .
Note : Pa has to be evaluated in each iteration twice using the appropriate expression .
The flowchart for the above process is shown in figure 4.6.

28

Figure 4.6 : Flowchart for Modified Euler method

29

Runge Kutta 4th order method:


The Runge Kutta (RK) methods are of the family of methods which use the slope or its
suitably modified value to give the point on the curve at the end of the interval . The first order
RK method is the Euler method itself . Runge-Kutta methods achieve the accuracy of a Taylor
series without the need to calculate higher derivatives . All of the variations of this technique
can be cast in the form [2]
yi+1 = yi + (xi, yi, h)h
where (xi, yi, h) is the increment function , which can be interpreted as a representative slope
over the interval . It can generally be expressed as [2]
= a1k1 + a2k2 + . + ankn
where the as are constants and the ks are the values of the slope at the coordinates specified
by f(x,y) . This function is basically the function that gives the value of the gradient at a
specific coordinate . The k's are evaluated as [2]
k1 = f(xi,yi)
k2 = f(xi+p1h, yi + q11k1h)
.
.
.
kn = f(xi+pn-1h, yi+qn-1,1k1h+qn-1,2k2h+..+qn-1,n-1kn-1h)
where ps and qs are constants .
The fourth order RK method has the iteration
yi+1 = yi + (1/6)*(k1 + 2k2 + 2k3 + k4)*h
30

where ,
k1 = f(xi,yi)
k2 = f(xi+h/2, yi+k1h/2)
k3 = f(xi+h/2, yi+k2h/2)
k4 = f(xi+h, yi+k3h)

Figure 4.7 : Plot of x vs. y (RK 4th order method)[2]

We have used the fourth-order RK method in solution of swing equation . The process
involved in the 4th order RK has been depicted in figure 4.7.
Runge Kutta 4th order method method applied to Swing curve solution:For the iterative solution of the swing equation , we have the equations (as has been discussed
in section 4.3)
d/dt =
d/dt = (1/M)*Pa()
The iteration steps are as follows

31

1. k1 = *t
q1 = (t/M)*(Pa())
2. k2 = (+q1/2)* t
q2 = (t/M)*(Pa( +k1/2))
3. k3 = ( +l2/2)* t
q3 = (t/M)*(Pa( +k2/2))
4. k4 = ( +l3)* t
q4 = (t/M)*(Pa( +k3))
5. = (k1+2k2+2k3+k4)/6
= (q1+2q2+2q3+q4)/6
6. (1) = +
(1) = +
The flowchart for the above process is shown in figure 4.8.

32

Figure 4.8 : Flowchart of RK4 method

33

NOTE:
In all of the above methods we have
when t < tc
Pa = Pm Pmaxdf*sin
when t = tc
Pa = (1/2)*((Pm-Pmaxdf*sin) + (Pm-Pmaxaf*sin))
and finally, when t > tc
Pa = Pm-Pmaxaf*sin
Following table gives a comparison between the numerical techniques used for the solution of
the swing equation .
Comparison between numerical methods:
modified Euler

RK 4th order

Property

Euler method

method

method

No. of slope approximations

Calculative effort

low

higher

highest

Speed of processing

fast

slower

slowest

Accuracy

not good

good

best

Convergence

good

better

best

Although the swing equation provides a means to study the dynamics of the machine , it is a
tedious process involving lot of calculative effort . The Equal Area Criterion (EAC) is a tool
which gives results much faster and facilitates the stability analysis . We discuss this in the
following chapter .

34

5. Equal Area Criterion


In the system where one machine is connected to an infinite bus, it is possible to study
transient stability by means of a simple criterion , without resorting to the numerical solution
of swing equation .
Consider swing equation
d2/dt2 = (1/M)*(Pm Pe ) = Pa/M
where M = H/f in pu system
Pa = accelerating power
H = inertia constant

Figure 5.1 : Plot of vs t for stable & unstable systems[5]


For an unstable system , continues to increase indefinitely with time and the machine loses
synchronism. On the other hand , if the system is stable (t) performs oscillations whose
amplitude decreases in actual practice but as damping term is neglected in swing equation ,
therefore in this case oscillations are of constant amplitude . However , the response (t) falls
into two broad categories as shown in figure 5.1. It can easily be visualized now that for a

35

stable system , indication of stability will be given by first swing where goes to a maximum
and will start to reduce . This fact can be stated as a stability criterion , that the system is stable
if at some time instant , d/dt = 0 and unstable if d/dt > 0 for a sufficiently long time (more
than 1 second is generally accepted) .

Application of EAC:
The aforementioned stability criterion for power system can be converted into a simple and
easily applicable form for SMIB:
Consider a single machine infinite bus system . The swing equation of the system is given by
M*(d2/dt2) = Pm Pe = Pa
Multiplying both sides of the equation by (2/M)*(d/dt) , we get
2*(d/dt)(d2/dt2) = (2Pa/M)(d/dt)

............ (7)

Integrating equation (7) , we get


(d/dt)2 = (2/M) Pa d
When the machine comes to rest with respect to the infinite bus - a condition , which may be
taken to indicate stability - requiring that

Pa d=0

............ (8)

The integral in equation (8) may be interpreted graphically as the area under a curve of Pa
plotted against between limits 0 , the initial angle , and 2 , the final angle . The condition
for stability is that there exists a for which the area under the curve is zero . We will briefly
illustrate the application of equal area criterion by applying it (to the following simple case)
for a synchronous generator connected to infinite bus through a double-circuit line as shown in
figure 5.2 .
36

Lets us assume that 3- symmetrical fault has occurred on transmission line with reactance
X2 . Then , for the assumed lossless system , EAC plot can be drawn as shown in figure 5.3.

Figure 5.2 : Single machine connected to infinite bus through two parallel lines[5]

Figure 5.3 : Illustration of equal area criterion[5]


Area shaded in magenta and area shaded brown may be interpreted in terms of kinetic energy
gained and lost by the synchronous generator , respctively . Thus for stable system
accelerating area must be equal to decelerating area .

37

6. Application of EAC to SMIB


Problem statement:
Following system of single machine connected to infinite bus will be used in our application to
illustrate the EAC concept .
Model, as shown in figure 6.1 , is described as :
Pm-constant mechanical input power provided by prime mover
H-inertia constant
E-generated emf behind transient reactance
V-voltage of infinite bus (maintained at constant voltage and frequency irrespective of
any

power flow)
Xt1,Xt2,X1,X2- transient reactances

Figure 6.1 : Single machine connected to infinite bus through two parallel lines[5]
Above system is considered under faulted condition at
1. Short circuit at one end of the parallel line
2. Short circuit away from line ends (Midline fault)

38

Sudden fault on one of the parallel lines


Case a: Fault at one end of the parallel line, near a bus
Let us now assume that the disturbance to be a short ciruit at the generator end of line 2 of a
double circuit line as shown in figure 6.2(a) . We shall assume the fault to be a three phase
one.

Figure 6.2 (a) : Short circuit at one end of the line[5]

Figure 6.2 (b) : Short circuit at one end of the line[5]

Before the occurrence of a fault the power angle curve is given by


E' V
Pbfmax =

, Pbf = Pbfmax sin


{Xt1+Xt2+(X1|| X2)}

39

Upon occurrence of a three phase fault at the generator end of the line 2 , the generator gets
isolated from the power system for the purpose of power flow as shown in figure 6.2(b). Thus
during the period the fault lasts
Pdf=0

The rotor therefore accelerates and angle increases . Synchronism will be lost unless the fault
is cleared in time .
The circuit breakers at the two ends of the faulted line open at time tc - the clearing time
(corresponding to c) , disconnecting the faulted line . The power flow is now restored via
healthy line (through higher line reactance X1 in place of X1|| X2) , with power angle curve
E' V
Pafmax =

; Paf = Pafmax sin


( Xt1+Xt2+X1)

Obviously , Pafmax < Pbfmax. The rotor now starts to decelerate . The system will be stable if a
decelerating area A2 can be found equal to accelerating area A1 before reaches the
maximum allowable value max . As area A1 depends upon clearing time tc (corresponding to
clearing angle c) , clearing time must be less than a certain value (critical clearing time) for
the system to be stable . It is to be observed that the equal area criterion helps to determine
critical clearing angle and not critical clearing time . Critical clearing time can be obtained by
numerical solution of the swing equation .

40

Figure 6.3 : Equal area criterion illustrated[5]

It also easily follows that larger initial angle (corresponding to magnitude of Pm) increases A1
for a given clearing angle (and time) and therefore quicker fault clearing would be needed to
maintain stable operation.All of these are shown in figure 6.3.
Case b: Fault away from line ends
When the fault occurs away from the line ends (say in the middle of a line) there is some
power flow during the fault , though considerably reduced , as different from case (a) where
Pdf = 0 . Circuit model of the system during fault is now shown in figure 6.4 (a). This circuit
reduces to that of figure 6.4(c) through one delta-star and one star-delta conversion . The
power angle curve during fault is therefore given by
E' V
Pdfmax=

, Pdf = Pdfmax sin


X II

41

Figure 6.4 (a)

Figure 6.4 (b)&(c) Simplification of circuit using delta-star & star-delta conversion[5]

Pbf and Paf as obtained previously and Pdf as obtained above are all plotted in figure 6.5.
Accelerating area A1 corresponding to given clearing angle c , is less in this case than in case
(a) , giving a better chance for stable operation .

42

Figure 6.5 : Equal area criterion applied to fault on middle of one line of the system[5]

Stable system is shown in fig 6.5 , wherein it is possible to find an area A2 equal to A1 for 2 =
max . As the clearing angle c is increased , area A1 increases and to find A2=A1 , 2 increases
till it has a value max , the maximum allowable for stability . This case of critical clearing angle
is shown in figure 6.6.

Figure 6.6 : Fault on middle of one line of the system case of critical clearing angle[5]
43

Applying equal area criterion to the case of critical clearing angle of figure , we can write ,
cr

max

(Pm Paf sin)d


o

(Paf sin Pm)d


cr

where
max = - sin-1(Pm/Paf)
simplifying we get ,
Pm (max 0) Pdf cos 0 + Paf cos max
cos cr =
Paf- Pdf
Critical clearing angles can be calculated from equation above . The angles in this equations
are in radians and can be converted to degrees by multiplying /180.
We have simulated both case a and case b in this applet .

The exact nature of the profiles and curves shown above depend on various factors . These
factors have been discussed in the next chapter .

44

7. Factors Affecting Power System Stability


There are various parameters of the SMIB system that contribute to its behaviour under
disturbances . Variation in the values or nature of these factors thus affects the stability of
SMIB system . These factors are

1. Synchronous machine parameters : These include the generator parameters such as


the inertia constant H and the generator bus voltage E . The bus voltage decides the
profile of the power curve . An increase in the inertia constant H of the machine
reduces the angle through which it swings in a given interval of time , thereby
improving the stability . This method cannot be employed practically because of
economic reasons and also because it slows down the response of the speed governor
loop (which can become oscillatory) apart from excessive rotor weight .

2. Transmission line parameters : We observe from the power angle curves that an
increase in the maximum power limits of the curves causes the accelerating area to
decrease and the decelerating area to increase , for a given value of clearing angle .
One of the methods for achieving this is to decrease transfer reactance . Reducing the
system transfer reactance is also a practical method of increasing stability limits . The
reactance can be decreased by increasing spacing and by increasing the conductor size.
Spacing is controlled by other factors like lightning protection and minimum clearance
to prevent arcing from one phase to other . Diameter can be increased by using hollow
cores and also by using material of low conductivity . The use of bundled conductors
decreases series reactance . Compensation for line reactance by series capacitor is an
economical method of increasing stability . Series compensation is more effective and
economical if it is switched on to increase the degree of compensation upon the
occurrence of a disturbance likely to cause instability . It also reduces the load voltage
fluctuation . Switching shunt capacitor on also increases the stability limits . But this is
preferred only if control of voltage is implemented because MVA rating required for
this is three to six times rating of switched series reactance .
45

Increasing number of lines in parallel between transmission points not only reduces the
transfer reactance but also increases the reliability of transmission line . However , this
is not economical .

3. Type of fault : Transient stability is greatly affected by the type of fault and location
of fault . In our case we have selected a 3-phase fault which is more severe from point
of view of power transfer .

4. Circuit breaker and relay characteristics :As majority of fault are transient in
nature , rapid switching and isolation of unhealthy lines followed by rapid reclosing
improves the stability margins . The modern circuit breaker technology has now made
it possible to clear a line in as fast as two cycles . Majority of faults are line to ground
in nature . It is natural that methods have been developed for selective single pole
opening and reclosing which further aid the stability limits . If L-G fault occurs at the
generator bus the power flow is not zero as in the case of three phase symmetrical fault
so breaker pole corresponding to faulty line is opened and other two lines remain in the
circuit and power continues to flow unlike in case of three pole switching where
power flow is reduced to zero . Thus single pole switching and reclosing aids the
stability problem and is widely accepted as it prevents large swing and consequently
voltage dips . Single pole switching is not economical in term of relaying and also
introduces the problem of over voltages caused due to single pole opening , owing to
line capacitances .

5. Excitation system and governor characteristics : When a fault takes place , the
voltage at all buses is reduced . At the generator terminal it is sensed by the Automatic
Voltage Regulator (AVR) which helps restore the voltage by acting within the
excitation system .

46

Using the analysis done up till now , we have designed an applet for simulating the SMIB
system behaviour under fault conditions, as a part of the project .
The effect of the parameters , discussed in this chapter , on system stability can be studied in
the software by:
1. Varying the inertia constant H
2. Varying various line impedances
3. Varying clearing time , tc
4. Varying generator emf , E or bus voltage , V; to vary the voltage and power profile
while keeping the other parameters constant .

47

8. Java and Applets


A software based analysis of the Equal Area Criterion is advantageous for various reasons .
Chief among them is the rapidity with which the effect of a particular combination of
parameters on system stability can be studied . Since the applet is made available on the
internet , it can be freely used for transient stability study . Also , the applet presents an
interface which allows the user to specify a wide range of inputs . This allows the study of the
effect of each parameter on the study of the system . The software also presents the
opportunity to study the effect of various numerical integration methods and step sizes on the
solution of the swing equation . Thus it helps to get a better understanding of the nuances of
stability study procedures .
Traditionally , programming languages have been split into two types compiler and
interpreter based .
Languages like C/C++ are compiler based languages . Their source code is targeted at a
particular combination of hardware and software . The compiler gives a compact executable
file which is run on the target . While the final executable is fast , it is not portable . To run on
another combination of hardware/software , you have to recompile the code , possibly with
appropriate modifications .
Languages like Perl , on the other hand , are interpreted languages . The source code is
interpreted by the Perl interpreter . Thus , you only need to install the appropriate interpreter in
order to run the program . However platform-specific issues (like special libraries or
resources) can still hamper executing the code . Also , interpreter based programs are slow
because the code is checked and compiled each time it is called up for execution . There is also
no guarantee that the program may execute in the same way on different platforms because
the interpreters are designed to account for and work around the differences in various
hardware/software combinations .
Java combines the features of both the categories of programming languages . The Java
48

compiler generates bytecode like a compiler language , which can then be run on any
compatible Java Virtual Machine (JVM) like an interpreted language . Thus , the twin goals of
final executable speed and wide range of targets for running the program is achieved . Thus ,
Java is a good choice for developing cross-platform applications . This is because of its
compile once run anywhere nature of development as has been mentioned .

Java is also more conducive to object oriented development as its syntax resembles native
Object Oriented Development (OOD) and Unified Modeling Language (UML) terminology .
Object oriented development simplifies the process of modeling and mapping physical
systems into any software .
An applet is an independent Java bytecode which can be downloaded from networks and run
in a browser . The only difference between a Java application and an applet is that an applet is
executed in a far more restricted environment . It usually involves behind-the-scenes
interaction with the browser in which the applet is being run . That being said , applets are
incredibly easy to design and use . Also , Java's Swing library gives an unsurpassed look-andfeel that is maintained across platforms not only does your program run the same way on all
platforms , but it also looks the same way .
All factors considered , Java (and applets) is a very good choice for rapid development of GUI
based applications for engineering purposes both educational and critical . Hence , we have
used Java as the programming language for developing the software .
In the following chapter we present the basic functioning and the appearance of the applet .

49

9. The PSS Applet


We have used the classical Model-View-Controller architecture to design the applet . In this
architecture , the physical system being modeled (in our case , the power system) is
encapsulated in the Model class . It is separated from the user interface (UI) (or the View
class) which is all the the end-user of the software sees . The Controller class acts as the
connection between the two .

Figure 9.1 : MVC architecture


However , for all practical purposes , the Controller is a sub-set of the View class . The
actually realized architecture is shown below . This is what we have used in the applet .

Figure 9.2 : Actual MVC architecture


The PowerSystem class which has been documented in the appendix (see Appendix 2) is the
Model shown in the above figure . The pssApplet class is the View . Functions that control
interaction between the pssApplet and PowerSytem classes will be included in the Controller ,
but as a rule , they usually are already a part of the View component , at least , for our applet .
The analysis done so far has been implemented in the PowerSystem class . The GUI features
50

that have been implemented in the pssApplet class are shown ahead .

The software consists of modules for input , plotting , data output , power system simulation ,
error handling , etc. The functioning of these modules is shown in the main flowchart diagram
in figure 9.3

51

Figure 9.3 : Main flowchart

52

Figure 9.3 : Main flowchart (contd.)

53

The interface designed for the user to interact with the applet is presented below through
snapshots of the various components .
Help menu:
Any application is incomplete without a help menu . We have kept a help menu at top most
left corner .

Figure 9.4 : Help menu


Every thing in help menu except About is explained in following sections . About contains
information about copyright , authors and the GPL license (see Appendix 3 for the license) .
Inputs:
The user gives the values of various parameters , either from text-boxes or drop-down menus .
When ever applet is loaded all the boxes are filled with default numerical values . These
values can be deleted and restored by using Reset and Defaults buttons . Input block and
corresponding help menu views as follows

54

Figure 9.5 : Input Parameters

Figure 9.6 : Input Parameters Explanation

55

Model:
To the top left corner of window we can see model with labels for which we are carrying out
analysis ,
Before fault it looks as follows

Figure 9.7 : Single machine tied to infinite bus as displayed in applet

On submission of valid input data the model changes and depicts the fault location , and CB
which are in operation flashes red , which indicates that the transmission line is isolated .

Figure 9.8 : model with flashing CBs

56

Output:
Critical parameters are computed and displayed in the output widgets .

Figure 9.9 : Calculated Output

The outputs are explained in the help menu as shown.

Figure 9.10 : Output Explained

57

The comprehension is enhanced when the simulation results are displayed graphically rather
than as data files . A single click displays the results of the simulation on the graphics
terminal . Getting results from one program and plotting them on another is a time consuming
process . Thus our output also includes the plotting of EAC (P- ) as well as swing curve (-t) .
These plots can be seen as follows

Figure 9.11 : Plot of vs. t for stable & unstable systems

:
Figure 9.12 : EAC Plot for stable system & unstable system

58

The corresponding help menus of the plots describes legend and other specifications .

Figure 9.13 : help menu which describes plots in detail


Appropriate error messages are also displayed .
Error messages sre displayed in the following cases

Values of either of maechanical power input , bus voltages or reactances is zero or


negative or the value of clearing time is negative .

Improper selection of fault location or method of integration .

Selection of step size is out of range .

An accelerating area cannot be obtained .

A decelerating area cannot be obtained .

Sample error messages have been shown below

Figure 9.14 : Error mesage

59

SNAPSHOTS:

Figure 9.15 : Snapshot before submission of data

60

Figure 9.16 : Snapshot on submission of valid data

61

10. Conclusions and scope for further development


The significance of education in any evolving society is paramount . System modelling in a
graphical environment on a PC can greatly improve the students' ability to grasp difficult
concepts .
This Java applet will be helpful in creating an interactive environment of "learning by doing" .
Beyond its ability to better convey certain concepts , the applet can increase motivation and
instill greater interest among students , and encourage them to be more actively involved in the
learning process . Consequently , their understanding of the course content can further
improve . Such an endeavor can also be useful to a teacher during instruction and otherwise in
their course work .
We have designed and created an user-friendly applet to illustrate the EAC method of power
system transient stability analysis for the Single Machine Infinite Bus Power System (SMIBPS).
Although the method is practically useful for single-machine systems only , and can only
provide the critical clearing angle (CCA) for a specific fault (solid 3 symmetrical fault) as of
now , it gives a much clearer understanding of the various nuances of power system stability .
This program is very useful for students to determine stability of system with variation of
system parameters such as E , tc , H , Pm etc . This will basically involve running the
application for the same set of data , varying only the test parameter .
Thus , it would be particularly useful for in the following respects
1. Observing stability results over a great range of input parameters, rapidly .
2. Fast and intuitive interpretation of results from the graphical outputs .
For students , it provides an insight into the transient stability concepts . For instructors , it can
help in designing drill and exam problems .
62

There are other salient features in the program .


1. Any kind of illegal data is handled and notified to user .
2. Applet is started with set of default values which can be erased using the Reset button
and retrieved using the Default button .
3. It also enables the user to select proper step size so that more accurate results can be
obtained and effect of step size on the accuracy of the swing curve can be studied .
The scope of this application can be further increased by updating existing features such as
allowing user to use more methods of integration . The application's model can be extended
to analyze different types of faults such as L-G , L-L-G , L-L , etc .
We have done analysis for loss less system but modifications can be made in the swing
equation and the model can be refined with regards to the assumptions that have been made for
design . For example , the damper resistance has been neglected in the swing equation . This
could be included in the swing equation to give more accurate results . Though the inaccuracy
is quite negligible by the standards set by the purpose of this work (educational purpose) , it
may be intolerable for more critical applications . Similarly , governor action may also be
considered to the same effect . Thus same system can be modified into lossy and practical
systems .

63

11.BIBLIOGRAPHY:
1. Presi, W. et al , "Numerical Recipies in C" , Cambridge University Press , 2nd edition,
1999
2. Chapra, S.C. and Canale, R.P.,"Numerical Methods for Engineers", TMH Publication, 4th
edition, 2004
3. Stevenson, W.D., "Elements of Power System Analysis", TMH Publication, 4th edition,
2000
4. Schildt, H. and Naughton, P., "The Complete Reference Java2 ", TMH Publication, 5th
edition, 2001
5. Nagrath, I.J. and Kothari, D.P., "Modern Power System Analysis", TMH Publication, 3rd
edition, 2003
6. Khan, A.Z. and Shahzad, F., "A PC based software package for the equal area criterion
of power system transient stability" IEEE Trans. Power Systems, Vol. 13, No. 1,
pp.21 26, Feb. 1998
7. Hadi, S., "Power System Analysis", TMH Publication, 1st edition, 1998
8. Gross, C., "Power System Analysis", John Wiley & Sons Inc, 2nd edition, 1998

64

Appendix 1
This is the source code for the PowerSystem class whose documentation is provided in
Appendix 2.
001
/*
002
Power System Stability - a JAVA applet to study power system
stability using
003
Equal Area Criterion
004
005
Copyright (c) 2006 authors
006
007
Prof. S. A. Soman, Electrical Engineering Dept., I.I.T., Mumbai
008
Prof. Shubha Pandit, Electrical Engineering Dept., S.P.C.E., Mumbai
009
010
Bhupendra Amodekar, B.E. (Electrical Engineering), S.P.C.E., Mumbai
011
Rohit Bhute, B.E. (Electrical Engineering), S.P.C.E., Mumbai
012
Anwesh Das, B.E. (Electrical Engineering), S.P.C.E., Mumbai
013
Prakash Nair, B.E. (Electrical Engineering), S.P.C.E., Mumbai
014
015
This program is free software; you can redistribute it and/or modify
016
it under the terms of the GNU General Public License as published by
017
the Free Software Foundation; either version 2 of the License, or
018
(at your option) any later version.
019
020
This program is distributed in the hope that it will be useful,
021
but WITHOUT ANY WARRANTY; without even the implied warranty of
022
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
023
GNU General Public License for more details.
024
025
You should have received a copy of the GNU General Public License
026
along with this program; if not, write to the Free Software
027
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA
028
You can also see the license at
<http://www.gnu.org/copyleft/gpl.html>
029
*/
030
031
import static java.lang.Math.*;
032
033
/**
034
*This class contains the basic SMIB model. It takes in the parameter
values,
035
*validates them and determines system stability using EAC. Various
I/O
036
*functions are provided to utilize the model parameters; inlcuding
those
037
*specific for graphic routines. The class can be extended to
increase its
038
*functionality. Variables are explained in the code listing.
039
*/
040
041

65

042
public class PowerSystem {
043
// miscellaneous variables
044
protected int FLAGS, STABLE;
045
protected double eNum, freq = 50, rem, stability_margin;
046
047
// system model parameters obtained from input
048
protected double
049
Pm,
// mechanical power input
050
H,
// inertia constant
051
E,
// voltage behind transient reactance
052
Xt1,
// reactance before generator and parallel link
053
X1,
// healthy transmission line
054
X2,
// soon-to-be faulty transmission line
055
Xt2,
// reactance betn parallel link & infinite bus
056
V,
// infinite bus assumed at angle 0
057
tc,
// fault clearing time
058
ts;
// step time for swing curve calculation
059
060
protected int
061
loc,
// location of fault - near a bus or midline
062
met;
// method of integration for swing curve
063
064
// system parameters in three stages
065
protected double
066
// before fault X, Pmax and delta zero
067
Xbf, Pmaxbf, delta_0,
068
069
//during fault X, Pmax
070
Xdf, Pmaxdf,
071
072
// after fault X, Pmax
073
Xaf, Pmaxaf,
074
delta_max, // max delta for stable system
075
delta_cr;
// critical clearing angle
076
077
// swing curve variables
078
protected double
079
M,
// inertia constant
in elect. degrees
080
delta_c,
// clearing delta
081
Paminus, Paplus;
082
protected double[] ang;
// data array for delta (in deg)
083
protected int fault_cleared_index;
084
085
086
// EAC variables
087
protected double delta2, a_area, d_area, rem_d_area;
088
// acc. area, dec. area
089
090
// methods
091
092
/**
093
*This method sets the model parameters to a default value.
094
*/
095
public void SetDefaults() {
096
Pm = 1;
H = 2.52; E = 1.2;
097
Xt1 = 0.25; X1 = 0.5; X2 = 0.4;

66

098
Xt2 = 0.05; V = 1;
tc = 0.12;
099
ts = 0.0001; loc = 1; met = 1;
100
}
101
102
/**
103
*This method sets the model parameters to zero. Not recommended
for use in
104
*model initialization. Use SetDefaults() instead.
105
*/
106
public void SetZero() {
107
Pm = 0;
H = 0;
E = 0;
108
Xt1 = 0; X1 = 0;
X2 = 0;
109
Xt2 = 0; V = 0;
tc = 0;
110
ts = 0;
loc = 0; met = 0;
111
}
112
113
// constructor
114
PowerSystem() {
115
SetDefaults();
116
}
117
118
/**
119
*This method assigns input values to model parameters.
120
*The following values are transferred through a vector: Pm, H,
E, Xt1,
121
*X1, X2, Xt2, V, tc, ts
122
*@param arg_list vector of above values
123
*@param location location of fault
124
*@param method method of integration for swing curve solution
125
*/
126
public void Initialize(double[] arg_list, int location, int
method) {
127
Pm = arg_list[0];
128
H = arg_list[1];
129
E = arg_list[2];
130
Xt1 = arg_list[3];
131
X1 = arg_list[4];
132
X2 = arg_list[5];
133
Xt2 = arg_list[6];
134
V = arg_list[7];
135
tc = arg_list[8];
136
ts = arg_list[9];
137
loc = location;
138
met = method;
139
140
// call ApplyEAC
141
ApplyEAC();
142
}
143
144
/**
145
*This method calculates the model in the three stages - before
fault,
146
*during fault and after fault. It also validates the parameter
values.
147
*@return model status - non-zero for errors
148
*/
149
protected int CalculateModel() {

67

150
// first validate inputs
151
if (Pm <= 0)
152
return 1;
153
if (H <= 0)
154
return 2;
155
if (E <= 0)
156
return 3;
157
if (Xt1 < 0)
158
return 4;
159
if (X1 <= 0)
160
return 5;
161
if (X2 <= 0)
162
return 6;
163
if (Xt2 < 0)
164
return 7;
165
if (V <= 0)
166
return 8;
167
if (tc < 0)
168
return 9;
169
if (ts > 0.1 || ts < 0.000001)
170
return 10;
171
if (loc != 1 && loc != 2)
172
return 11;
173
if (met != 1 && met != 2 && met != 3 && met !=4)
174
return 12;
175
176
// before fault model
177
Xbf = Xt1+X1*X2/(X1+X2)+Xt2;
178
Pmaxbf = E*V/Xbf;
179
delta_0 = asin(Pm/Pmaxbf);
180
181
// during fault model
182
if (loc == 1)
// 1 - near bus fault
183
Pmaxdf = 0; // Xdf is not needed, hence ignored
184
185
if (loc == 2)
// 2 - midline fault
186
{
187
double
188
Za = X2/2,
// midline, Za and Zb can be in
any ratio
189
Zb = X2/2,
190
Z10 = Xt1+X1*Za/(X1+X2),
// delta - star conversion
191
Z20 = Xt2+X1*Zb/(X1+X2),
// we lump the reactances
in the limbs
192
Z30 = Za*Zb/(X1+X2),
193
Xdf = Z10+Z20+Z10*Z20/Z30; // star - delta, for Xdf
only
194
Pmaxdf = E*V/Xdf;
195
if (Pm <= Pmaxdf*sin(delta_0))
196
return 13;
// we won't get an
accelerating area
197
}
198
199
// after fault model
200
Xaf = Xt1+X1+Xt2;
201
Pmaxaf = E*V/Xaf;
202

68

203
if (Pmaxaf <= Pm)
// we won't get a decelerating area
204
return 14;
205
206
delta_max = PI-asin(Pm/Pmaxaf);
207
// we will use eNum in the expression for delta_cr
208
eNum = Pm*(delta_max-delta_0)Pmaxdf*cos(delta_0)+Pmaxaf*cos(delta_max);
209
delta_cr = acos(eNum/(Pmaxaf-Pmaxdf));
210
211
// if we get this far, the user's model has no errors
212
return 0;
213
}
214
215
/**
216
*This method calculates the accelerating power, Pa, at a given
instant.
217
*@param delta angle for which Pa has to be caluclated
218
*@param i value which determines instant of Pa - pre,post or
during fault
219
*@return Pa
220
*/
221
protected double accPower(double delta, int i) {
222
double P = 0;
223
if (i < fault_cleared_index)
224
P = Pm-Pmaxdf*sin(delta);
225
226
if (i == fault_cleared_index)
227
{
228
Paminus = Pm-Pmaxdf*sin(delta);
229
Paplus = Pm-Pmaxaf*sin(delta);
230
P = (Paminus+Paplus)/2;
231
}
232
233
if (i > fault_cleared_index)
234
P = Pm-Pmaxaf*sin(delta);
235
236
return P;
237
}
238
239
240
/**
241
*The main method in this class. Look here when things act funny.
242
*This method does the following: calculate swing curve using
either of
243
*the 4 available methods and then determine system stability
using EAC.
244
*/
245
protected void ApplyEAC() {
246
FLAGS = CalculateModel();
247
248
if (FLAGS == 0)
249
{
250
// Swing Curve
251
double
252
t = 0, tf = 2.0,
// plot till tf in
steps of ts
253
delta = delta_0, d_delta = 0, // delta and

69

incremental delta
254
255
256
sec.
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
Pmaxdf*sin(delta);
302
303
304
305
306
307

Pa = 0;

// accelerating power

if (tc > 0.25)

// plot for atleast 2

tf = 8*tc;
int size = (int)(tf/ts);
ang = new double[size];

//size of data arrays

int i;
M = H/(PI*freq);
fault_cleared_index = (int)(tc/ts);
// step by step solution of swing equation
if (met == 1)
{
for (i = 0; i < size; i++)
{
if (i == 0)
{
ang[i] = toDegrees(delta_0);
Paminus = 0;
Paplus = Pm-Pmaxdf*sin(delta);
Pa = (Paminus+Paplus)/2;
continue;
}
d_delta = d_delta+(ts*ts*Pa/M);
delta = delta+d_delta;
ang[i] = toDegrees(delta);
// calculate Pa for next iteration
Pa = accPower(delta, i);
}
}
// euler
if (met == 2)
{
double w = 0;
for (i = 0; i < size; i++)
{
if (i == 0)
{
ang[i] = toDegrees(delta_0);
w = 0;
Paminus = 0;
Paplus = Pm-

Pa = (Paminus+Paplus)/2;
continue;

w = w+(ts*Pa/M);
delta = delta+ts*w;

70

308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
Pmaxdf*sin(delta);
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
Pmaxdf*sin(delta);
362

ang[i] = toDegrees(delta);
// calculate Pa for next iteration
Pa = accPower(delta, i);
}

// modified euler
if (met ==3)
{
double w = 0, wp = 0, dp = 0, k = 0, q = 0;
for (i = 0; i < size; i++)
{
if (i == 0)
{
ang[i] = toDegrees(delta_0);
w = 0;
Paminus = 0;
Paplus = PmPa = (Paminus+Paplus)/2;
continue;
}
wp = w+Pa*ts/M;
dp = delta+wp*ts;
k = accPower(delta, i)/M;
q = accPower(dp, i)/M;
delta = delta+ts*(w+wp)/2;
w = w+ts*(k+q)/2;
ang[i]=toDegrees(delta);
// Pa for next iteration
Pa=accPower(delta, i);
}

// RK-4
if (met == 4)
{
double
w = 0,
k1 = 0, k2 = 0, k3 = 0, k4 = 0,
q1 = 0, q2 = 0, q3 = 0, q4 = 0;
for (i = 0; i < size; i++)
{
if (i == 0)
{
ang[i] = toDegrees(delta_0);
w = 0;
Paminus = 0;
Paplus = PmPa = (Paminus+Paplus)/2;

71

363
continue;
364
}
365
366
k1 = w;
367
q1 = accPower(delta, i)/M;
368
369
k2 = w+ts*q1/2;
370
q2 = accPower((delta+ts*k1/2), i)/M;
371
372
k3 = w+ts*q2/2;
373
q3 = accPower((delta+ts*k2/2), i)/M;
374
375
k4 = w+ts*q3;
376
q4 = accPower((delta+ts*k1), i)/M;
377
378
w = w+ts*(q1+2*q2+2*q3+q4)/6;
379
delta = delta+ts*(k1+2*k2+2*k3+k4)/6;
380
ang[i]=toDegrees(delta);
381
}
382
}
383
384
385
// to find delta_c
386
delta_c = toRadians(ang[fault_cleared_index]);
387
388
// Equal Area Criterion
389
double e;
// e = a_area-d_area, should be zero
390
391
for (delta2 = delta_c; delta2 <= delta_max+0.5;
delta2 = delta2+0.0001)
392
{
393
a_area = Pm*(delta_cdelta_0)+Pmaxdf*(cos(delta_c)-cos(delta_0));
394
d_area = Pmaxaf*(cos(delta_c)-cos(delta2))Pm*(delta2-delta_c);
395
e = a_area-d_area;
396
if (e < 0) /* practically will check for
zero */
397
break;
398
}
399
400
// system stability check
401
if (delta2 <= delta_max)
402
{
403
STABLE = 1;
404
rem_d_area = Pmaxaf*(cos(delta2)cos(delta_max))-Pm*(delta_max-delta2);
405
stability_margin =
rem_d_area/(rem_d_area+d_area);
406
}
407
408
else
409
{
410
STABLE = 0;
411
stability_margin = -1;
412
}
413

72

414
415
416
} // end FLAGS check
417
}
418
419
/**
420
* This method fetches the model status for use outside the
class.
421
*/
422
public int GetStatus() {
423
return FLAGS;
424
}
425
426
/**
427
*This method is used to extract various power angles for use
outside
428
*the class. The vector contains: initial angle, critical
clearing angle,
429
*clearing angle, maximum angle for system to be stable, angle
which the
430
*system swings up to (according to EAC), stability status and
stability
431
*margin.
432
*@return vector
433
*/
434
public double[] GetParameters() {
435
double[] param_list = new double[7];
436
param_list[0] = rint(toDegrees(delta_0)*10000)/10000;
437
param_list[1] = rint(toDegrees(delta_cr)*10000)/10000;
438
param_list[2] = rint(toDegrees(delta_c)*10000)/10000;
439
param_list[3] = rint(toDegrees(delta_max)*10000)/10000;
440
param_list[4] = rint(toDegrees(delta2)*10000)/10000;
441
param_list[5] = (double)STABLE;
442
param_list[6] = rint(stability_margin*1000000)/10000;
443
return param_list;
444
}
445
446
/**
447
*This method is used to get data related to Swing Curve
448
*@return vector
449
*/
450
public int[] GetSwingCurveParameters() {
451
int[] param_list = new int[2];
452
param_list[0] = fault_cleared_index;
453
param_list[1] = ang.length;
454
return param_list;
455
}
456
457
/**
458
*This method retrieves the data actually used to plot a swing
curve
459
*@return vector
460
*/
461
public double[] GetSwingCurveData() {
462
return ang;
463
}
464

73

465
466
467
- pre-,
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
plotting
483
angle.
484
485
486
487
488
489
490
491
492
493
}

/**
*This method extracts the four power parameters from the model *mechanical input power - Pm; and power during the three phases
*during- and post-fault.
*@return vector
*/
public double[] GetEACPowerValues() {
double[] param_list = new double[4];
param_list[0] = Pm;
param_list[1] = Pmaxbf;
param_list[2] = Pmaxdf;
param_list[3] = Pmaxaf;
return param_list;
}
/**
*This method gives the values of delta angles necessary for
*EAC curves - initial angle, clearing angle and maximum swing
*@return vector
*/
public double[] GetEACDeltaValues() {
double[] param_list = new double[3];
param_list[0] = delta_0;
param_list[1] = delta_c;
param_list[2] = delta2;
return param_list;
}

74

Appendix 2
Class Documentation
The main class in this software is the PowerSystem class whose documentation has been
provided here. This documentation has been generated using the javadoc utility from
comments embedded in the source code.

Class PowerSystem
java.lang.Object
PowerSystem

public class PowerSystemextends java.lang.Object

This class contains the basic SMIB model. It takes in the parameter values, validates them and
determines system stability using EAC. Various I/O functions are provided to utilize the model
parameters; inlcuding those specific for graphic routines. The class can be extended to increase
its functionality. Variables are explained in the code listing.

Field Summary
protecte
d
double
protecte
d
double[
]

a_area

ang

protecte
d
double

d_area

protecte
d
double

delta_0

protecte
d
double

delta_c

protecte
d
double

delta_cr

protecte
d
double

delta_max

75

protecte
d
double

delta2

protecte
d
double

protecte
d
double

eNum

protecte
d int

fault_cleared_index

protecte
d int

FLAGS

protecte
d
double

freq

protecte
d
double

protecte
d int

loc

protecte
d
double

protecte
d int

met

protecte
d
double

Paminus

protecte
d
double

Paplus

protecte
d
double

Pm

protecte
d
double

Pmaxaf

protecte
d
double

Pmaxbf

protecte
d
double

Pmaxdf

protecte
d
double

rem

76

protecte
d
double

rem_d_area

protecte
d
double

stability_margin

protecte
d int

STABLE

protecte
d
double

tc

protecte
d
double

ts

protecte
d
double

protecte
d
double

X1

protecte
d
double

X2

protecte
d
double

Xaf

protecte
d
double

Xbf

protecte
d
double

Xdf

protecte
d
double

Xt1

protecte
d
double

Xt2

Constructor Summary
PowerSystem()

Method Summary
77

protecte
d
double

accPower(double delta, int i)


This method calculates the accelerating power, Pa, at a given instant.

protecte
d void

ApplyEAC()
The main method in this class.

protecte
d int

CalculateModel()
This method calculates the model in the three stages - before fault, during
fault and after fault.

double[
]

GetEACDeltaValues()
This method gives the values of delta angles necessary for plotting EAC
curves - initial angle, clearing angle and maximum swing angle.

double[
]

GetEACPowerValues()
This method extracts the four power parameters from the model mechanical input power - Pm; and power during the three phases - pre-, duringand post-fault.

double[
]

GetParameters()
This method is used to extract various power angles for use outside the
class.

int
double[
]
int[]

GetStatus()
This method fetches the model status for use outside the class.
GetSwingCurveData()
This method retrieves the data actually used to plot a swing curve
GetSwingCurveParameters()
This method is used to get data related to Swing Curve

void

Initialize(double[] arg_list, int location,


int method)
This method assigns input values to model parameters.

void

SetDefaults()
This method sets the model parameters to a default value.

void

SetZero()
This method sets the model parameters to zero.

Methods inherited from class java.lang.Object


clone, equals, finalize, getClass, hashCode, notify,
notifyAll, toString, wait, wait, wait

Field Detail

78

FLAGS
protected int FLAGS

STABLE
protected int STABLE

eNum
protected double eNum

freq
protected double freq

rem
protected double rem

stability_margin
protected double stability_margin

Pm
protected double Pm

79

H
protected double H

E
protected double E

Xt1
protected double Xt1

X1
protected double X1

X2
protected double X2

Xt2
protected double Xt2

V
protected double V

80

tc
protected double tc

ts
protected double ts

loc
protected int loc

met
protected int met

Xbf
protected double Xbf

Pmaxbf
protected double Pmaxbf

delta_0
protected double delta_0

81

Xdf
protected double Xdf

Pmaxdf
protected double Pmaxdf

Xaf
protected double Xaf

Pmaxaf
protected double Pmaxaf

delta_max
protected double delta_max

delta_cr
protected double delta_cr

M
protected double M

82

delta_c
protected double delta_c

Paminus
protected double Paminus

Paplus
protected double Paplus

ang
protected double[] ang

fault_cleared_index
protected int fault_cleared_index

delta2
protected double delta2

a_area
protected double a_area

83

d_area
protected double d_area

rem_d_area
protected double rem_d_area

Constructor Detail
PowerSystem
PowerSystem()

Method Detail
SetDefaults
public void SetDefaults()

This method sets the model parameters to a default value.

SetZero
public void SetZero()

This method sets the model parameters to zero. Not recommended for use in model
initialization. Use SetDefaults() instead.

Initialize
public void Initialize(double[] arg_list,
int location,
int method)

This method assigns input values to model parameters. The following values are transferred
through a vector: Pm, H, E, Xt1, X1, X2, Xt2, V, tc, ts
84

Parameters:
arg_list - vector of above values
location - location of fault
method - method of integration for swing curve solution

CalculateModel
protected int CalculateModel()

This method calculates the model in the three stages - before fault, during fault and after fault.
It also validates the parameter values.
Returns:
model status - non-zero for errors

accPower
protected double accPower(double delta,
int i)

This method calculates the accelerating power, Pa, at a given instant.


Parameters:
delta - angle for which Pa has to be caluclated
i - value which determines instant of Pa - pre,post or during fault
Returns:
Pa

ApplyEAC
protected void ApplyEAC()

The main method in this class. Look here when things act funny. This method does the
following: calculate swing curve using either of the 4 available methods and then determine
system stability using EAC.

85

GetStatus
public int GetStatus()

This method fetches the model status for use outside the class.

GetParameters
public double[] GetParameters()

This method is used to extract various power angles for use outside the class. The vector
contains: initial angle, critical clearing angle, clearing angle, maximum angle for system to be
stable, angle which the system swings up to (according to EAC), stability status and stability
margin.
Returns:
vector

GetSwingCurveParameters
public int[] GetSwingCurveParameters()

This method is used to get data related to Swing Curve


Returns:
vector

GetSwingCurveData
public double[] GetSwingCurveData()

This method retrieves the data actually used to plot a swing curve
Returns:
vector

86

GetEACPowerValues
public double[] GetEACPowerValues()

This method extracts the four power parameters from the model - mechanical input power Pm; and power during the three phases - pre-, during- and post-fault.
Returns:
vector

GetEACDeltaValues
public double[] GetEACDeltaValues()

This method gives the values of delta angles necessary for plotting EAC curves - initial angle,
clearing angle and maximum swing angle.
Returns:
vector

87

Appendix 3
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid

88

anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.

89

GNU GENERAL PUBLIC LICENSE


TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

90

2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of

91

this License, whose permissions for other licensees extend to the


entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you

92

received the program in object code or executable form with such


an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are

93

prohibited by law if you do not accept this License. Therefore, by


modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

94

It is not the purpose of this section to induce you to infringe any


patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions

95

either of that version or of any later version published by the Free


Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
SERVICING,
REPAIR OR CORRECTION.

96

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN


WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT
LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES
SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH
ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

97

How to Apply These Terms to Your New Programs


If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Also add information on how to contact you by electronic and paper mail.

98

If the program is interactive, make it output a short notice like this


when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

99

Das könnte Ihnen auch gefallen