Veac Ja Report
-
Upload
praveen-kumar -
Category
Documents
-
view
223 -
download
0
description
Transcript of Veac Ja Report
-
APROJECT REPORT
ON
VISUALIZATION OF EQUAL AREA CRITERIONUSING JAVA APPLET
Conducted atI.I.T. Mumbai
Submitted in partial fulfillment of the requirements for degree of
BACHELOR OF ELECTRICAL ENGINEERING(UNIVERSITY OF MUMBAI)
Prepared byPRAKASH NAIR
BHUPENDRA AMODEKARROHIT BHUTEANWESH DAS
Department of Electrical EngineeringSardar Patel College of Engineering
Munshi Nagar, Andheri (West),Mumbai - 400058
1
-
CERTIFICATETHIS TO CERTIFY THAT
AMODEKAR BHUPENDRA VASANT SEAT NO: 2912BHUTE ROHIT V. SEAT NO: 2915
DAS ANWESH SEAT NO: 2917 NAIR PRAKASH SEAT NO: 2906
HAVE PRESENTED A PROJECT ENTITILEDVISUALIZATION OF EQUAL AREA CRITERION
USING JAVA APPLETAND THE SAME IS APPROVED FOR THE DEGREE OF
BACHELOR OF ELECTRICAL ENGINEERINGUNIVERSITY OF MUMBAI
_______________ _______________
Internal Guide External Guide
_______________ _______________
Internal Examiner External Examiner
_______________
Head of Department
2
-
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).
3
-
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.
4
-
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
5
-
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
7
-
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 .
9
-
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 ........... (1)
where
P = number of machine poles
Thus,
K.E. = * {J*(2/P)2 * s * 10-6} * s
10
-
= *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) s2/elect rad
= H/(180*f) 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-1where
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:
Property Euler methodmodified Euler
methodRK 4th order
method
No. of slope approximations 1 2 4
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 CriterionIn 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 = (Paf sin Pm)d
o cr
where
max = - sin-1(Pm/Paf)
simplifying we get ,
Pm (max 0) Pdf cos 0 + Paf cos maxcos 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-and-
feel 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 (SMIB-
PS).
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 using003 Equal Area Criterion004 005 Copyright (c) 2006 authors006 007 Prof. S. A. Soman, Electrical Engineering Dept., I.I.T., Mumbai008 Prof. Shubha Pandit, Electrical Engineering Dept., S.P.C.E., Mumbai009 010 Bhupendra Amodekar, B.E. (Electrical Engineering), S.P.C.E., Mumbai011 Rohit Bhute, B.E. (Electrical Engineering), S.P.C.E., Mumbai012 Anwesh Das, B.E. (Electrical Engineering), S.P.C.E., Mumbai013 Prakash Nair, B.E. (Electrical Engineering), S.P.C.E., Mumbai014 015 This program is free software; you can redistribute it and/or modify016 it under the terms of the GNU General Public License as published by017 the Free Software Foundation; either version 2 of the License, or018 (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 of022 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the023 GNU General Public License for more details.024 025 You should have received a copy of the GNU General Public License026 along with this program; if not, write to the Free Software027 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA028 You can also see the license at
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 its038 *functionality. Variables are explained in the code listing.039 */040 041
65
-
042 public class PowerSystem {043 // miscellaneous variables044 protected int FLAGS, STABLE;045 protected double eNum, freq = 50, rem, stability_margin;046 047 // system model parameters obtained from input048 protected double049 Pm, // mechanical power input050 H, // inertia constant051 E, // voltage behind transient reactance052 Xt1, // reactance before generator and parallel link053 X1, // healthy transmission line054 X2, // soon-to-be faulty transmission line055 Xt2, // reactance betn parallel link & infinite bus056 V, // infinite bus assumed at angle 0057 tc, // fault clearing time058 ts; // step time for swing curve calculation059 060 protected int061 loc, // location of fault - near a bus or midline062 met; // method of integration for swing curve063 064 // system parameters in three stages065 protected double066 // before fault X, Pmax and delta zero067 Xbf, Pmaxbf, delta_0, 068 069 //during fault X, Pmax070 Xdf, Pmaxdf,071 072 // after fault X, Pmax073 Xaf, Pmaxaf,074 delta_max, // max delta for stable system 075 delta_cr; // critical clearing angle076 077 // swing curve variables078 protected double079 M, // inertia constant in elect. degrees080 delta_c, // clearing delta081 Paminus, Paplus;082 protected double[] ang; // data array for delta (in deg)083 protected int fault_cleared_index;084 085 086 // EAC variables087 protected double delta2, a_area, d_area, rem_d_area; 088 // acc. area, dec. area089 090 // methods091 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 in104 *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 // constructor114 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, ts122 *@param arg_list vector of above values123 *@param location location of fault124 *@param method method of integration for swing curve solution125 */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 ApplyEAC141 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 inputs151 if (Pm
-
203 if (Pmaxaf 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 Curve251 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 Pa = 0; // accelerating power255 256 if (tc > 0.25) // plot for atleast 2 sec.257 tf = 8*tc;258 259 int size = (int)(tf/ts); //size of data arrays260 ang = new double[size];261 262 int i;263 M = H/(PI*freq);264 fault_cleared_index = (int)(tc/ts);265 266 // step by step solution of swing equation267 if (met == 1)268 {269 for (i = 0; i < size; i++)270 {271 if (i == 0)272 {273 ang[i] = toDegrees(delta_0);274 Paminus = 0;275 Paplus = Pm-Pmaxdf*sin(delta);276 Pa = (Paminus+Paplus)/2;277 continue;278 }279 280 d_delta = d_delta+(ts*ts*Pa/M);281 delta = delta+d_delta;282 ang[i] = toDegrees(delta);283 284 // calculate Pa for next iteration 285 Pa = accPower(delta, i);286 }287 288 }289 290 // euler291 if (met == 2)292 {293 double w = 0;294 for (i = 0; i < size; i++)295 {296 if (i == 0)297 {298 ang[i] = toDegrees(delta_0);299 w = 0;300 Paminus = 0;301 Paplus = Pm-Pmaxdf*sin(delta);302 Pa = (Paminus+Paplus)/2;303 continue;304 }305 306 w = w+(ts*Pa/M);307 delta = delta+ts*w;
70
-
308 ang[i] = toDegrees(delta);309 310 // calculate Pa for next iteration311 Pa = accPower(delta, i);312 }313 }314 315 // modified euler316 if (met ==3)317 {318 double w = 0, wp = 0, dp = 0, k = 0, q = 0;319 for (i = 0; i < size; i++)320 {321 if (i == 0)322 {323 ang[i] = toDegrees(delta_0);324 w = 0;325 Paminus = 0;326 Paplus = Pm-Pmaxdf*sin(delta);327 Pa = (Paminus+Paplus)/2;328 continue;329 }330 331 wp = w+Pa*ts/M;332 dp = delta+wp*ts;333 334 k = accPower(delta, i)/M;335 q = accPower(dp, i)/M;336 337 delta = delta+ts*(w+wp)/2;338 w = w+ts*(k+q)/2;339 ang[i]=toDegrees(delta);340 341 // Pa for next iteration342 Pa=accPower(delta, i);343 }344 }345 346 // RK-4347 if (met == 4)348 {349 double 350 w = 0, 351 k1 = 0, k2 = 0, k3 = 0, k4 = 0,352 q1 = 0, q2 = 0, q3 = 0, q4 = 0;353 354 for (i = 0; i < size; i++)355 {356 if (i == 0)357 {358 ang[i] = toDegrees(delta_0);359 w = 0;360 Paminus = 0;361 Paplus = Pm-Pmaxdf*sin(delta);362 Pa = (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 Criterion389 double e; // e = a_area-d_area, should be zero390 391 for (delta2 = delta_c; delta2
-
414 415 416 } // end FLAGS check417 } 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 the430 *system swings up to (according to EAC), stability status and stability431 *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 Curve448 *@return vector449 */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 curve459 *@return vector 460 */461 public double[] GetSwingCurveData() {462 return ang;463 }464
73
-
465 /**466 *This method extracts the four power parameters from the model -467 *mechanical input power - Pm; and power during the three phases - pre-, 468 *during- and post-fault.469 *@return vector470 */471 public double[] GetEACPowerValues() {472 double[] param_list = new double[4];473 param_list[0] = Pm;474 param_list[1] = Pmaxbf;475 param_list[2] = Pmaxdf;476 param_list[3] = Pmaxaf;477 return param_list;478 }479 480 481 /**482 *This method gives the values of delta angles necessary for plotting 483 *EAC curves - initial angle, clearing angle and maximum swing angle.484 *@return vector485 */486 public double[] GetEACDeltaValues() {487 double[] param_list = new double[3];488 param_list[0] = delta_0;489 param_list[1] = delta_c;490 param_list[2] = delta2;491 return param_list;492 }493 }
74
-
Appendix 2Class 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 PowerSystemjava.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 Summaryprotecte
d double
a_area
protected
double[]
ang
protected
doubled_area
protected
doubledelta_0
protected
doubledelta_c
protected
doubledelta_cr
protected
doubledelta_max
75
-
protected
doubledelta2
protected
doubleE
protected
doubleeNum
protected int fault_cleared_index
protected int FLAGS
protected
doublefreq
protected
doubleH
protected int loc
protected
doubleM
protected int met
protected
doublePaminus
protected
doublePaplus
protected
doublePm
protected
doublePmaxaf
protected
doublePmaxbf
protected
doublePmaxdf
protected
doublerem
76
-
protected
doublerem_d_area
protected
doublestability_margin
protected int STABLE
protected
doubletc
protected
doublets
protected
doubleV
protected
doubleX1
protected
doubleX2
protected
doubleXaf
protected
doubleXbf
protected
doubleXdf
protected
doubleXt1
protected
doubleXt2
Constructor SummaryPowerSystem()
Method Summary
77
-
protected
doubleaccPower(double delta, int i) This method calculates the accelerating power, Pa, at a given instant.
protected void ApplyEAC() The main method in this class.protected 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-, during- and post-fault.
double[]GetParameters() This method is used to extract various power angles for use outside the class.
int GetStatus() This method fetches the model status for use outside the class.
double[]GetSwingCurveData() This method retrieves the data actually used to plot a swing curve
int[] 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.Objectclone, 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
-
Hprotected 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 valueslocation - location of faultmethod - 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 caluclatedi - 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 copy