0% found this document useful (0 votes)
2 views

Lab Manual PSOC

Uploaded by

Sana Ullah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lab Manual PSOC

Uploaded by

Sana Ullah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 94

LABORATORY MANUAL

EXPERIMENTS IN

POWER SYSTEM OPERATION & CONTROL

DEPARTMENT OF ELECTRICAL ENGINEERING


UNIVERSITY OF ENGINEERING & TECHNOLOGY, LAHORE
NAROWAL CAMPUS

1
EXPERIMENTS IN

POWER SYSTEM OPERATION & CONTROL

2
INTRODUCTION
Power System Operation and Control is concerned with the optimal and
economical operation of power systems. All the major steps of Power System
Operational Planning (i.e. Unit Commitment, Economic Dispatch, Optimal Power
Flow, Hydro-thermal Scheduling) and Power System Control (Load Frequency
Control, Automatic Voltage Regulator) are covered in this manual.
This Manual, presents a series of experiments dealing with all the major aspects of
power system operational planning and power system control. Each experiment is
accompanied by a set of objectives, , a detailed discussion of the theoretical
concepts and Mathematical Formulation that are investigated or verified through
manual calculation and MATLAB Simulations. Most of the question require
students to compare experimental with theoretical concepts to speculate on reasons
for discrepancies, and to learn from deductive resonating.
The sequence and scope of the experiments in this manual is parallel to the
material covered in the text book. These experiments are basically implementation
of lessons covered in theory through Software Simulation to verify the results. At
the end of each experiment students have to submit a separate report which should
include the analysis of results of the experiment.

3
POWER SYSTEM OPERATION AND CONTROL
TABLE OF CONTENT

Sr. No DESCRIPTION

Study and Plot of different types of load curves from given


1
data using MATLAB
Analysis and Plot of Convex and Non-Convex
2 Characteristics of Thermal Generation Units Using
MATLAB
Economic Dispatch of Thermal Generating Units Using
3
Analytical Method
Economic Dispatch of Thermal Power Systems Using
4
Lambda Iteration Method Considering Generation Limits
Economic Dispatch of Thermal Power Systems with
5
Transmission Line Losses
Solution of Economic Dispatch problem by Newton method
6
and Gradient method
Solution of Unit Commitment Problem by Enumeration
7
Method
8a: Numerical solution of non-linear equations using
8 Euler’s method, modified Euler’s method, ode23 and
ode45

8b: Single-Machine Stability Study using ode23 and


ode45 (Simulink)

4
Modeling of Different Components of Load Frequency

9 Control for Thermal Generating Unit and Simulation of


Single Area Power System

10 Automatic Generation Control of Single Area Power System

11 Automatic Generation Control for Multi-Area Power System

Modeling of Different Components of Automatic Voltage


12 Regulator (AVR) System for Thermal Generating Unit and
Simulation of Given Test System

5
EXPERIMENT No. 1
STUDY AND PLOT OF DIFFERENT TYPES OF LOAD CURVES FROM
GIVEN DATA USING MATLAB
PURPOSE:
To learn

1. How to build a load curve, load duration curve and integrated load duration for a
given data.
2. Valuable information extracted from these load curves.

SOFTWARE USAGE:MATLAB
INTRODUCTION:
The demand for power has increased exponentially over the last century. This has increased the
emphasis on the performance and efficiency of power supplies used in everyday electronics as
well as sophisticated electronic and communication systems. A power supply is a component,
subsystem, or system that converts electrical power from one form to another. In power system,
it is important to know the daily-load curve that consists of demand pattern by various classes of
users.
Load Curve: A graphical plot showing the variation in demand for energy of the consumers on a
source of supply with respect to time is known as the load curve.
If this curve is plotted over a time period of 24 hours, it is known as daily load curve. If it’s
plotted for a week, month, or a year, then it’s named as the weekly, monthly or yearly load curve
respectively.
From out of the load connected, a consumer uses different fractions of the total load at various
times of the day as per his/her requirements. Since a power system has to supply load to all such
consumers, the load to be supplied varies continuously with time and does not remain constant.
If the load is measured (in units of power) at regular intervals of time, say, once in an hour (or
half-an-hour) and recorded, we can draw a curve known as the load curve.
Load Duration Curve: The load–duration curve is a plot of the load demands (in units of
power) arranged in a descending order of magnitude (on the y-axis) and the time in hours (on
the x-axis). A load duration curve enables us to determine the number of hours per year, when
the load is greater or lesser than any given amount. Similarly it also shows the loads that are
carried for more or lesser than particular direction.
Information obtained from load curves:

6
Area under the load curve = Units generated,
Highest point of the curve = Maximum Demand
(Area under curve) / (by total hours) = Average load
It helps in selection of the rating and number of generating units required. To further assess
the usefulness of the generating plants from these curves, various factors are also computed.
Some of them are:

𝑨𝒗𝒆𝒓𝒂𝒈𝒆 𝑳𝒐𝒂𝒅
𝑳𝒐𝒂𝒅 𝑭𝒂𝒄𝒕𝒐𝒓 = (𝟏. 𝟏)
𝑴𝒂𝒙𝒊𝒎𝒖𝒎 𝑫𝒆𝒎𝒂𝒏𝒅

𝑴𝒂𝒙𝒊𝒎𝒖𝒎 𝑫𝒆𝒎𝒂𝒏𝒅
𝑫𝒆𝒎𝒂𝒏𝒅 𝒇𝒂𝒄𝒕𝒐𝒓 = (𝟏. 𝟐)
𝑪𝒐𝒏𝒏𝒆𝒄𝒕𝒆𝒅 𝑳𝒐𝒂𝒅

𝑨𝒗𝒆𝒓𝒂𝒈𝒆 𝑳𝒐𝒂𝒅
𝑷𝒍𝒂𝒏𝒕 𝑪𝒂𝒑𝒂𝒄𝒊𝒕𝒚 𝑭𝒂𝒄𝒕𝒐𝒓 = (𝟏. 𝟑)
𝑷𝒍𝒂𝒏𝒕 𝑪𝒂𝒑𝒂𝒄𝒊𝒕𝒚

PROCEDURE:

Generally load curves are built by recording the values of load demands for every instant during
a certain time interval and plot a graph of load demands against a time for which it occurs. The
procedure for plotting Load Curves in MATLAB is as:
1. Open a new M-file in MATLAB.
2. A function is initialized that takes input variable data and in output we obtain plot of load
cycle for a given interval.
Function[]=loadcurve(data)
3. First of demand interval and load is defined by the variable data in a three column matrix.
For Example:

4. The first two columns are the demand interval and third column is load value. The
demand interval may be minutes, hours, and months in ascending order and load values

7
are generally in KW or MW. In above example first row of data variable shows that for
first two hours (00-02) load demand is 6 MW.
5. Now type the following commands at M-file window.
L=length(data)
tt=[data(:,1) data(:,2)]
t=sort(reshape(tt,1,2*L));
pp=data(:,3);
for n=1:L
P(2*n-1)=pp(n);
P(2*n)=pp(n);
end
plot(t,p)

6. Save the commands above in your thumb drive directory, save as loadcurve.m
7. Now execute the above function and following load curve plot will be obtained.
However the procedure for plotting a load duration curve is different from load curves that is
given below:
8. Determine the peak load and duration for which it occurs.
9. Then take the next lower load and find the total time during the year when this and the
previous greater load occurs.
10. Plot the load against the number of hours during the year, month or day for which it
occurs, or against the percentage of time during the year.
11. Further some useful information can also be extracted from these curves. i.e. Total
Energy from area under the curve, load factor etc.
E=pp’*(t2-t1)
Pavg=W/sum(t2-t1)
Peak=max(pp)
LF=(Pavg/Peak)*100;

OBSERVATIONS AND CALCULATIONS:


Task 1:The load on power plant for a particular day is given below:

Time 12-4 a.m. 4 a.m.-8 8 a.m- 6 p.m-8 8 a.m.- 10 p.m-


a.m. 6.p.m p.m. 10 p.m. 12 p.m.

Load (KW) 15 35 70 80 90 15

Plot the load curve, load duration curve.

8
(i) Load Curve:
As the load demands are given for 24 hours, so daily load curve plotted for a given load by
adopting above mentioned procedure is shown below:

(ii) Load Duration Curve:

1. First of all peak load demand and duration for which it is occurs are determined. In this
example peak demand is 90 MW and it occurs for 2 hours.
2. Starting from peak load demand following table is constructed to determine various
points on load duration curve.

Load (KW) Hours in a day % Time


90 2 8.33
80 2+2=4 16.66
70 4+10=14 58.33
35 14+4=18 75
15 18+6=24 100

3. Now plot the load demands against calculated time in table 2.

9
EXERCISE-1
A generating station has the following daily load cycle:

Time 0-6 6-10 10-12 12-16 16-20. 20-24

Load (KW) 20 25 30 25 35 20

Draw the load curve and find (i) maximum demand (ii) Units generated per day (iii)
Average Load (iv) Load Factor

EXERCISE-2
A consumer has a connected load of 12 lamps each of 100 W at his/ her premises. His/ her load
demand is as follows:
From midnight to 5 A.M.: 200 W.
5 A.M. to 6 P.M.: no load.
6 P.M. to 7 P.M.: 700 W.
7 P.M. to 9 P.M.: 1,000 W.
9 P.M. to midnight: 500 W.

10
Draw the load curve and calculate the (i) energy consumption during 24 hours, (ii) demand
factor, (iii) average load, (iv) maximum demand, and (v) load factor

CONCLUSION:
Plotting of different types of load factors and their significance has been studied. There are
various performance factors related to the load curves.Energy consumption during different
periods can be calculated using load curves.

TASK:
After going through the questions and answers related to the experiment, submit a
separate report which should include the analysis of the results of the experiment.

Teacher / Supervisor’s Signature:

11
EXPERIMENT No. 2
TO STUDY THE CONVEX AND NON-CONVEX CHARACTERISTICS OF
THERMAL UNITS USING MATLAB
PURPOSE:
To learn
1. Analysis and plot of convex characteristics of thermal generating units.
2. Analysis and plot of non-convex characteristics of thermal generating units.
3. To analyze the effect of cost coefficients on the convex and non-convex characteristics.

SOFTWARE USED:
MATLAB
INTRODUCTION:
In analyzing the problems associated with the operation of power system, there are many
possible parameters of interest. Fundamental is the basic cost data and set of input-output
characteristics of generation units. Different types of fuel are used in thermal power plants.
Depending on the types of turbine such as single value or multi value, the characteristic differs.
Although the operating cost of these units consists of both fuel and maintenance costs, only the
fuel cost varies directly with the units and also with the level of generation. The fuelcost is
incurred during the running (either at no-load or at any load), start-up and sometimesshutdown
conditions of the steam units.
Steam turbines with single valve operation usually exhibit smooth operations in
comparison with multivalve machine. Multi-inlet valves are opened and closed in sequence by
the turbine governor controlling the flow of steam to a separate group of nozzles. These valves
are opened and closed to minimize losses at partial loads allowing higher efficiencies to be
maintained under all load conditions but unfortunately their cost curves are not exactly convex
rather they exhibit discontinuities at valve opening and closing points making cost characteristics
non convex as shown below:

2.1 Input-Output Fuel Cost Characteristics:


Unit (Boiler, turbine and generator) input-output curve establishes the relationship between
energy input to the driving system and the net energy output from the generator.
(i) Convex Characteristics:

𝐻(𝑃) = 𝑎 + 𝑏𝑃 + 𝑐𝑃2 (𝑀𝑏𝑡𝑢⁄ℎ)

𝐹(𝑃) = 𝑎 + 𝑏𝑃 + 𝑐𝑃2 (𝑅⁄ℎ)

Where a, b and c are the thermal coefficients of generating unit.

12
Figure 2.1: Input-Output heat rate characteristics

(ii) Non-Convex Characteristics:


Non convex characteristic results due to valve point effect, multiple fuels and
prohibitedoperating zones. The valve point effects produce a ripple, which is highly non-
smooth anddiscontinuous as represented in Figure 2.2.
𝐻(𝑃) = 𝑎 + 𝑏𝑃 + 𝑐𝑃2 + |𝑒𝑆𝑖𝑛𝑓(𝑃𝑚𝑖𝑛 − 𝑃)| (𝑀𝑏𝑡𝑢⁄ℎ)
or
𝐹(𝑃) = 𝑎 + 𝑏𝑃 + 𝑐𝑃2 + |𝑒𝑆𝑖𝑛𝑓(𝑃𝑚𝑖𝑛 − 𝑃)| (𝑅⁄ℎ)

Figure 2.2: Input-Output curve of Multi-Valve Steam Generator

2.2 Incremental Heat Rate Characteristics:

13
This incremental heat rate characteristic is the slope (the derivative) of the input-output
characteristic (dH/dP or dF/dP). The data shown on this curve are in terms of Btu per kilowatt
hour (or $ per kilowatt hour) versus the net power output of the unit in megawatts. This
characteristic is widely used in economic dispatching of the unit. It is converted to an
incremental fuel cost characteristic by multiplying the incremental heat rate in Btu per kilowatt
hour by the equivalent fuel cost in terms of $ per Btu. Frequently this characteristic is
approximated by a sequence of straight-line segments. The incremental heat rate characteristic
for a unit of Convex Characteristics type is shown in Following Figure:

Figure 2.3: Incremental heat rate curve

2.3. Net Heat Rate Characteristics


The last important characteristic of a steam unit is the unit (net) heat rate characteristic shown in
Following Figure.This characteristic is H/P or F/P versus P. It is proportional to the reciprocal
of the usual efficiency characteristic developed for machinery. The unit heat rate characteristic
shows the heat input per kilowatt hour of output versus the megawatt output of the unit.

14
Figure 2.4: Net heat rate characteristics

PROCEDURE:
The procedure of plotting the convex and non-convex characteristics of thermal generating
stations is given below:

For Convex Characteristics:


1. For a given generating unit, write down the characteristic equation of machine in
following form:
𝐹(𝑃) = 𝑎 + 𝑏𝑃 + 𝑐𝑃2 (𝑅⁄ℎ)
2. Plot the graph between fuel cost and power generated by taking power output at y-
axes and input fuel cost at x-axes on graph paper. This equation gives the relation
between powers generated and input heat rate or fuel cost.
3. To plot incremental heat rate or incremental cost curve, take a derivative of above
mentioned quadratic characteristic curve.
𝑑𝐹(𝑃)
= 𝑏 + 2𝑐𝑃 (𝑅⁄ )
𝑑𝑃 𝑀𝑊ℎ
4. Plot the graph between ⁄𝑑𝑃 𝑜𝑟 𝑑𝐹⁄𝑑𝑃 against power generated P. This graph is
𝑑𝐻
the slope of input-output characteristics of generating unit.
5. Now to determine the net heat rate characteristics, a graph is plotted between 𝐻/𝑃 or
𝐹⁄ versus Power output. The unit heat rate characteristics shows the heat input per
𝑃
kilowatt hour of output versus the megawatt output of units.
𝐹(𝑃) 𝑎
= + 𝑏 + 𝑐𝑃 (𝑅⁄ )
𝑃 𝑃 𝑀𝑊ℎ
6. Now these characteristics are also demonstrated through MATLAB. Open a new M-
file in MATLAB and type the following code:
MATLAB CODE:
a=550; b=8.1 ; c=.00028;
p=10:10:100;
t=a+b*p+c*(p).^2;
title ('Convex X-tics');
xlabel('Output (MW)');
ylabel('MBTU/hr or Rs./hr');
plot(p,t);
hold on;
a=309; b=8.1 ; c=.00056;
p=10:10:100;
t=a+b*p+c*(p).^2;
plot(p,t,'-r.');

15
hold on;
a=307; b=8.1 ; c=.00056;
p=10:10:100;
t=a+b*p+c*(p).^2;
plot(p,t,'-g*');
hold on;

For Non-Convex Characteristics:


1. For a given generating unit, write down the characteristic equation of machine in
following form:
𝐹(𝑃) = 𝑎 + 𝑏𝑃 + 𝑐𝑃2 + |𝑒𝑆𝑖𝑛𝑓(𝑃𝑚𝑖𝑛 − 𝑃)|
2. Plot the graph between fuel cost and power generated by taking power output at y-
axes and input fuel cost at x-axes on graph paper. This equation gives the relation
between powers generated and input heat rate or fuel cost.
3. To plot incremental heat rate or incremental cost curve, take a derivative of above
mentioned quadratic characteristic curve.
𝑑𝐹(𝑃) = 𝑏 + 2𝑐𝑃 + (|𝑒𝐶𝑜𝑠𝑓(𝑃 − 𝑃)| − 𝑓) (𝑅⁄ )
𝑚𝑖𝑛 𝑀𝑊ℎ
𝑑𝑃
4. Plot the graph between 𝑑𝐻⁄𝑑𝑃 𝑜𝑟 𝑑𝐹⁄𝑑𝑃 against power generated P. This graph is
the slope of input-output characteristics of generating unit.
5. Now to determine the net heat rate characteristics, a graph is plotted between 𝐻/𝑃 or
𝐹⁄ versus Power output. The unit heat rate characteristics shows the heat input per
𝑃
kilowatt hour of output versus the megawatt output of units.
𝐹(𝑃) 𝑎 |𝑒𝑆𝑖𝑛𝑓(𝑃𝑚𝑖𝑛 − 𝑃)| (𝑅⁄ )
= + 𝑏 + 𝑐𝑃 +
𝑃 𝑃 𝑃 𝑀𝑊ℎ
6. Now these characteristics are also demonstrated through MATLAB. Open a new M-
file in MATLAB and type the following code:
MATLAB CODE:
a=550; b=8.1 ; c=.00028; e=300; f= 0.035;
p=10:10:100;
t=a+b*p+c*(p).^2+abs(e*sin(f*(10-p)));
plot(p,t);
title ('Non-Convex X-tics');
xlabel('Output (MW)');
ylabel('MBTU/hr or Rs./hr');
hold on;
a=309; b=8.1 ; c=.00056; e=200; f= 0.042;
p=10:10:100;

16
t=a+b*p+c*(p).^2+abs(e*sin(f*(10-p)));
plot(p,t,'-r.');
hold on;
a=307; b=8.1 ; c=.00056; e=150; f= 0.042;
p=10:10:100;
t=a+b*p+c*(p).^2+abs(e*sin(f*(10-p)));
plot(p,t,'-g*')
hold on;

EXERCISE:
The fuel cost functions for three thermal plants in $/h are given by:
F  500  5.3P  0.004P2
1 1 1

F  400  5.5P  0.006P2


2 1 1

F  200  5.8P  0.009P2


1 1 1

Where P1, P2 and P3 are in MW.

For the given system plot the input-output fuel cost curve, incremental cost curve and net fuel
rate curve.

CONCLUSION:
From the above curves we analyse that
 Parameter ‘a’ is always constant and is independent of the loading on the unit and
represents the fix cost of the unit. It is the no load cost and always present.
 ‘b’ is responsible for the steepness of the cost curve and is linearization factor for the
curve. ‘c’ is multiplied with the square function so it makes the line a curved figure.
 The curve changes enormously with a very small change in ‘c’ as compared with ‘a’ and
‘b’.
 ‘e’ and ‘f’ are responsible for non-convex behaviour of the curve. ‘f’ is responsible for
the number of oscillations in the non-convex behaviour and it repeats itself faster as ‘f’
gets bigger while ‘e’ is the magnitude of these oscillations.

17
TASK:
After going through the questions and answers related to the experiment, submit a
separate report which should include the analysis of the results of the experiment.

Teacher / Supervisor’s Signature:

18
EXPERIMENT No. 3
ECONOMIC DISPATCH OF THERMAL GENERATING UNITS USING
ANALYTICAL METHOD
PURPOSE:
To learn
1. Mathematical formulation of economic dispatch problem
2. Equal incremental cost criteria to solve simplified economic dispatch problem (without
considering generation limits and losses)

SOFTWARE USED:
MATLAB

INTRODUCTION:
Economic Dispatch Problem(EDP)is the process of calculating the generation allocation
to the machines at minimum cost while satisfying the constraints. It is a generation allocation
problem.
The economic dispatch problem mathematically may be defined as:

Where FT is total fuel cost and Fi(Pi) is fuel cost function. The fuel cost functions for convex
systems is given below:
𝐹𝑖(𝑃𝑖) = 𝑎 + 𝑏𝑃𝑖 + 𝑐𝑃2𝑖 … … . (𝑅⁄ℎ)

Equal Incremental Cost Criteriastates that total cost of generation will be minimum if all
the machines are operating at same incremental cost while satisfying the constraints.It means that
cost for generation of next unit form a point is same for all machines.

19
Analytical method is used to find the value of lambda λ for the Equal Incremental Cost
Criteria to solve EDP. It is a single iteration method for EDP, which gives λ and Pi, for which
cost is minimum.

Equal Incremental Cost Criteria:


The working philosophy of this method is that constrained problem can be converted into an
unconstrained problem by forming the Lagrange, or augmented function. Optimum is obtained
by using necessary conditions.
𝐿 = 𝐹𝑇 + 𝜆𝜑
𝑁

𝐿 = 𝐹𝑇 + 𝜆 [𝑃𝐷 − ∑ 𝑃𝑖]
𝑖=1
The necessary conditions for constrained local minima of L are the following:
𝜕𝐿
=0
𝜕𝑃𝑖
𝜕𝐿
=0
𝜕𝜆

Condition 1:

20
First condition gives:
𝜕𝐿 = 𝜕𝐹𝑇 + 𝜆(0 − 1) = 0
𝜕𝑃𝑖 𝜕𝑃𝑖
or
𝜕𝐹𝑇 𝜕𝐹𝑇
−𝜆=0⇒ =𝜆
𝜕𝑃𝑖 𝜕𝑃𝑖
As 𝐹𝑇 = 𝐹1 + 𝐹2 + ⋯ + 𝐹𝑁
𝜕𝐹𝑇 𝑑𝐹𝑇
= =𝜆
𝜕𝑃𝑖 𝑑𝑃𝑖
and therefore the condition for optimum dispatch is
𝑑𝐹𝑇
=𝜆
𝑑𝑃𝑖
or
𝑏𝑖 + 2𝑐𝑖𝑃𝑖 = 𝜆

Condition 2:
Second condition results in
𝑁
𝜕𝐿
= 𝑃𝐷 − ∑ 𝑃𝑖 = 0
𝜕𝜆
𝑖=1
or
𝑁

𝑃𝐷 = ∑ 𝑃𝑖
𝑖=1
For most economical operation, all plants must operate at equal incremental production cost
while satisfying the equality constraint equation given above:
𝜆 − 𝑏𝑖
𝑃𝑖 =
2𝑐𝑖
The relation given above are known as coordination equations. They are function of 𝜆. An
analytical solution for 𝜆 is given by substituting the values of𝑃𝑖 in equality constraint:
𝑁
𝜆 − 𝑏𝑖
∑( ) = 𝑃𝐷
2𝑐𝑖
𝑖=1
Solving it for 𝜆 gives
𝑃 + ∑𝑁 ( 𝑏 𝑖 )
𝐷 𝑖=1 2𝑐𝑖
𝜆= ∑𝑁 ( )
1
𝑖=1 2𝑐
𝑖

PROCEDURE:

21
The procedure for implementation of equal incremental cost criteria to solve economic dispatch
problem is given below:
1. Identify cost coefficients (ai, bi, ci), power demand (Pd) and its constraints from the
given problem.
2. Calculate the Lamda (R/MWh) by using following equation:
n
PD   i
b
Lamda() i 1 2ci
n

  2c1
i 1 i

3. Now calculate generation sharing of individual generators using the equation:

  bi
Pi 
2ci
Note:
4. A
The problem must be solved by hand and the obtained results must be verified using
f MATLAB
t
er computing the individual power calculate the individual cost of each generator by
substituting the value of power (obtained in step-3) in the respective fuel cost equations.
5. Calculate total cost of generation by adding up the individual costs as:
n n

FTotal   Fi   (ai  bi Pi  ci P 2
i )
i 1 i 1
6. Write down the calculated results in the Table-1.
Now obtained result are verified through MATLAB.
7. Open a new M-file in MATLAB.
8. Type the following code
MATLAB-Code:
function [P,Lamda,Cost]=analytical(Pd,A)
n=length(A);
for i = 1:n
a(i,1)=A(i,1);
b(i,1)=A(i,2);
c(i,1)=A(i,3);
end
Lamda = (Pd +sum( b./(2*c)))/sum( 1./(2*c) );
P=(Lamda-b)./(2*c);
Cost=sum( [sum(a) sum(b.*P) sum(c.*(P.^2))] );

22
9. Write down the MATLAB result in Table-1.
10. Compare both the results to verify that the calculated results are in accordance with
MATLAB.

EXERCISE:

The fuel cost functions for three thermal plants in $/h are given by:
F  500  5.3P  0.004P2
1 1 1

F  400  5.5P  0.006P2


2 1 1

F  200  5.8P  0.009P2


1 1 1

Where P1, P2 and P3 are in MW. The Total load PD is 800 MW, neglecting the line losses and
generation limits, find the optimal dispatch and the total cost $/h using Analytical Method.

RESULTS:
After compilation of MATLAB program, write down the obtained results in following table and
compare it with the manual calculations:
Table-3.1
Lambda(λ) P1 P2 P3 F1 F2 F3 Total
($/MWhr) (MW) (MW) (MW) ($/hr) ($/hr) ($/hr) Cost($/hr)
Calculated
Values
MATLAB
results

CONCLUSION:
Analytical method is the mathematical implementation of Equal Incremental Cost
Criteria. It gives one value of λ for which total cost is minimum. It provides an overview of the
ideal operation of thermal units. It is quite simple to perform.

TASK:
After going through the questions and answers related to the experiment, submit a
separate report which should include the analysis of the results of the experiment.

Teacher / Supervisor’s Signature:

23
EXPERIMENT No. 4
ECONOMIC DISPATCH OF THERMALGENERATING UNITS USING
lAMBDA ITERATION METHOD
PURPOSE:
To learn

1. To become familiar with λ-iteration Method


2. To construct and implement an algorithm for λ-iteration method of solving Economic
Dispatch Problem and write its code in MATLAB.

SOFTWARE USED:MATLAB
INTRODUCTION:

Economic Dispatch Problem (EDP) is the process of calculating the generation allocation to the
machines at minimum cost while satisfying the constraints. It is a generation allocation problem. The
economic dispatch problem mathematically may be defined as:

24
Iterative Method:

λ-iteration method is an iterative procedure in which EDP is repeated until a certain level
of accuracy is achieved. Initial value of λ is specified in the start of procedure. Value of λ is used
to find generation allocation Pi for all the units which are then used to find new value of λ.
The equality constraint in economic dispatch problem is given as:
𝑁

∑ 𝑃𝑖 = 𝑃𝐷
𝑖=1
In equal incremental cost criteria method, we derived the relation of 𝑃𝑖 as:
𝜆 − 𝑏𝑖
𝑃𝑖 =
2𝑐𝑖
By substituting the value of 𝑃𝑖 in equality constraint, we get
𝑁
𝜆 − 𝑏𝑖
∑( ) = 𝑃𝐷
2𝑐𝑖
𝑖=1
The above equation can be expressed as:
𝑓(𝜆) = 𝑃𝐷
Expanding by Taylor’s series about an operating point 𝜆𝐾 and neglecting higher order terms
results in

25
𝐾
𝑑𝑓(𝜆)
𝑓(𝜆)(𝐾) + ( ) Δ𝜆(𝐾) = 𝑃𝐷
𝑑𝜆

Δ𝜆(𝐾) = 𝑃𝐷 − 𝑓(𝜆)
(𝐾)
𝐾
𝑑𝑓(𝜆)
( )
𝑑𝜆

(𝐾)
Δ𝜆(𝐾) = Δ𝑃 𝐾
𝑑𝑓(𝜆)
( )
𝑑𝜆

(𝐾)
Δ𝜆(𝐾) = Δ𝑃
𝑑𝑃𝑖 𝐾
( )
𝑑𝜆
or
Δ𝑃(𝐾)
Δ𝜆(𝐾) =
∑1
2𝑐𝑖

and therefore
𝜆(𝐾+1) = 𝜆(𝐾) + Δ𝜆(𝐾)
Where
𝑁

Δ𝑃(𝐾) = 𝑃𝐷 − ∑ 𝑃𝑖
𝑖=1
The process is continued until Δ𝑃(𝐾) is less than a pre-specified accuracy.
PROCEDURE:
The procedure of implementation of Lamda-iteration method to solve economic dispatch
problem is given below:

Note:
The problem must be solved by hand and the obtained results must be verified
using MATLAB

1. Identify cost coefficients (ai, bi, ci), power demand (PD) and its constraints from the given
problem.

2. Assume an initial value of lambda a little higher than bi coefficients of fuel cost

26
3. Calculation generation of individual generators by substituting that assumed value of
lambda into the following equation:
  bi
Pi 
2ci
4. Check whether the value of Pi of each generating unit calculated in above step is within
the prescribed limits. If the calculated value violates the maximum limit put P equal to
Pmax and if P violates lower limit put it equal to Pmin.

5. Calculate residual power by subtracting power demand from generated power as:
n

P  Pd   P
i 1
i

6. Next ∆λ can be calculated as:

7. New value of λ is found as

8. Repeat steps 3, 4 and 5 using the new values of lambda.

9. Repeat steps 3, 4 and 5 until a certain level of accuracy is achieved such as (∆λ<0.0001)
10. Calculate the individual cost of each generator by substituting the value of final power in
the respective fuel cost equations.
11. Calculate total cost of generation by adding up the individual costs as:
n n

FTotal   Fi   (ai  bi Pi  ci P 2
i )
i 1 i 1
11. Write down the calculated results in the Table-1.
Now obtained results are also verified through MATLAB Program.
12. Open a new M-file in MATLAB.
13. Type the following code:
MATLAB CODE:
%g= initial guess of lamda; A= co-efficients of cost equations; pd= power demand;
function [cost,lamda,p]=iter_lamb(pd,A,g)
n=length(A);
dg=10;
for i=1:n
a(i,1)=A(i,1);

27
c(i,1)=A(i,3);
end
while ( abs(dg)>0.0001 )
p=(g-b)./(2*c);
for k=1:n
if p(k) > pmax(k)
p(k)=pmax(k);
elseif p(k)< pmin(k)
p(k)=pmin(k);
else, end
end
dp=pd-sum(p);
dg = dp/sum(1./(2*c));
g=g+dg;
lamda=g;
end
cost=sum([sum(a) sum(b.*p) sum(c.*(p.^2))])

14. Write down the MATLAB result in Table-1.


15. Compare both the results to verify that the calculated results are in accordance with
MATLAB.

EXERCISE:

The fuel cost functions for three thermal plants in $/h are given by:
F  500  5.3P  0.004P2
1 1 1

F  400  5.5P  0.006P2


2 1 1

F  200  5.8P  0.009P2


1 1 1

With following generation limits


200  P1  450

150  P2  350

100  P3  225
Where P1, P2 and P3 are in MW, the total load PD is 800 MW, neglecting the line losses and
considering generation limits, find the optimal dispatch and the total cost $/h using Lambda
Iteration Method.

28
RESULTS:
After compilation of MATLAB Program, write down the obtained results in following table and
compare it with the manual calculations.

Table-4.1

Lambda(λ) P1 P2 P3 F1 F2 F3 Total
($/MWhr) (MW) (MW) (MW) ($/hr) ($/hr) ($/hr) Cost($/hr)
Calculated
Values
MATLAB
results

CONCLUSION:
λ-iteration method is an accurate iterative method of solving ED Problem. In this
experiment a simplified version of ED problem with generation limits is effectively solved
through iterative method. However iterative method is unable to solve ED problem with non-
convex fuel cost function.

TASK:
After going through the questions and answers related to the experiment, submit a separate report
which should include the analysis of the results of the experiment.
Teacher / Supervisor’s Signature:

29
30
EXPERIMENT No. 5
ECONOMIC DISPATCH OF THERMAL POWER SYSTEM WITH
TRANSMISSION LINE LOSSES
PURPOSE:
To learn
1. Formulation of economic dispatch problem with transmission losses.
2. To construct and implement an algorithm to solve dispatch problem with
transmission line losses using iterative approach.

SOFTWARE USED:
MATLAB

INTRODUCTION:
Economic Dispatch Problem(EDP)is the process of calculating the generation allocation
to the machines at minimum cost while satisfying the constraints. It is a generation allocation
problem. The economic dispatch problem mathematically may be defined as:
𝑁

𝐎𝐛𝐣𝐞𝐜𝐭𝐢𝐯𝐞 𝐅𝐮𝐧𝐜𝐭𝐢𝐨𝐧: 𝑇𝑜 𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝐹𝑇 = ∑ 𝐹𝑖(𝑃𝑖)


𝑖=1

Subjected to:

Equality Constraint: 𝑃𝐷 + 𝑃𝐿 − ∑𝑁𝑖=1 𝑃𝑖 = 0

In-equality Constraint: 𝑃𝑖 − 𝑃𝑖𝑚𝑎𝑥 ≥ 0

𝑃𝑖𝑚𝑖𝑛 − 𝑃𝑖 ≤ 0
Where 𝑖 = 1,2, … . . 𝑁. and 𝑃𝐿 is transmission line losses.

One common practice for including the effect of transmission line losses is to express the total
transmission line losses as a quadratic function of the generator power outputs. The simplest
quadratic form is:
𝑁 𝑁

𝑃𝐿 = ∑ ∑ 𝑃𝑖𝐵𝑖𝑗𝑃𝑗
𝑖=1 𝑗=1

A more general formula containing a linear term and a constant term, referred to Kron’s Loss
formula is:

31
𝑁 𝑁 𝑁

𝑃𝐿 = ∑ ∑ 𝑃𝑖𝐵𝑖𝑗𝑃𝑗 + ∑ 𝐵0𝑖𝑃𝑖 + 𝐵𝑜𝑜


𝑖=1 𝑗=1 𝑖=1

The coefficient 𝐵𝑖𝑗 are called loss coefficients or B-coefficients. B-coefficients are assumed
constant and reasonable accuracy is expected providing the actual operating conditions are close
to the base case where the B-constants are computed.
The Langrange function for this problem is:

𝐿 = 𝐹𝑇 + 𝜆𝜑
𝑁

𝐿 = 𝐹𝑇 + 𝜆 [𝑃𝐷 + 𝑃𝐿 − ∑ 𝑃𝑖]
𝑖=1
The necessary conditions for constrained local minima of L are the following:
𝜕𝐿
=0
𝜕𝑃𝑖
𝜕𝐿
=0
𝜕𝜆
Condition 1:

First condition gives:


𝜕𝐿 𝜕𝐹𝑇 𝜕𝑃𝐿
= + 𝜆 (0 + − 1) = 0
𝜕𝑃𝑖 𝜕𝑃𝑖 𝜕𝑃𝑖
And therefore the condition for economic dispatch is:
𝜕𝐹𝑇 𝜕𝑃𝐿
+𝜆( )=𝜆
𝜕𝑃𝑖 𝜕𝑃𝑖
Or
1 𝑑𝐶𝑖
𝜕𝑃𝐿 𝑑𝑃 = 𝜆
(1 − ) 𝑖 𝜕𝑃𝑖
And
𝑛
𝜕𝑃𝐿
= 2 ∑ 𝐵𝑖𝑗𝑃𝐽 + 𝐵𝑜𝑖
𝜕𝑃𝑖
𝑖=1
𝜕𝐹𝑇
= 𝑏𝑖 + 2𝑐𝑖𝑃𝑖
𝜕𝑃𝑖
Substitute the value of 𝜕𝑃𝐿and 𝜕𝐹𝑇in optimality equation for condition 1and solve it for 𝑃 :
𝜕𝑃𝑖 𝜕𝑃𝑖 𝑖
(𝑘) (𝑘) ∑
(𝑘) 𝜆 (1 − 𝐵𝑜𝑖) − 𝑏𝑖 − 2𝜆 𝑗≠𝑖 𝐵𝑖𝑗𝑃𝑗
𝑃𝑖 =
2(𝑐𝑖 + 𝜆(𝑘)𝐵𝑖𝑖)

32
If following simplified loss equation is used for transmission line losses calculation then the
value of 𝑃𝑖.
𝜆 − 𝑏𝑖
𝑃𝑖 =
2(𝑐 + 𝜆𝐵 )
𝑖 𝑖𝑖

Condition 2:
Second condition results in:
𝑁

𝑃𝐷 + 𝑃𝐿 = ∑ 𝑃𝑖
𝑖=1

PROCEDURE:
The procedure to solve economic dispatch problem with transmission line losses for a given
system is given below:

Note:
The problem must be solved by hand and the obtained results must be verified
using MATLAB

1. Identify cost coefficients (ai, bi, ci), power demand (Pd) and its constraints from the
given problem.

2. Assume an initial value of lambda a little higher than bi coefficients of fuel cost
equations.

3. Calculation generation of individual generators by substituting that assumed value of


lambda into the following equation:
𝜆 − 𝑏𝑖
𝑃𝑖 =
2(𝑐 + 𝜆𝐵 )
𝑖 𝑖𝑖
4. Check whether the calculated value of 𝑃𝑖in above step is within the prescribed limits. If
the P calculated violates the minimum limit put P equal to Pmin and if P violates upper
limit put it equal to Pmax.
5. Calculate Power loss by using Kron’s Loss formula by substituting the values of
calculated powers in the following formula:

6. Calculate ∆P by using following equation:

33
n
P  PD  PL  P
i 1
i

7. Next ∆λ can be calculated as:

𝑁 𝑛
𝜕𝑃𝑖 𝑐𝑖 + 𝐵𝑖𝑖𝑏𝑖
∑( )=∑
𝜕𝜆 2(𝑐𝑖 + 𝜆𝐵𝑖𝑖)2
𝑖=1 𝑖=1

8. New value of λ is calculated as:

 K 1  K  K
9. Repeat above steps (3, 4, 5, 6, 7, 8) until a certain level of accuracy is achieved such as
(∆λ<0.0001).
10. Calculate the individual cost of each generator by substituting the value of final power in
the respective fuel cost equations.
11. Calculate total cost of generation by adding up the individual costs as:
n n

FTotal   Fi   (ai  bi Pi  ci P 2
i )
i 1 i 1
12. Now open MATLAB and create a new M-file.
13. Type the following code:
MATLAB CODE:
%g= initial guess of lamda; A= co-efficients of cost equations; pd= power
%demand; pmin=min limits of generation; pmax= max limits of generation. ;
%B= B co-efficient matrix
function [cost,lamda,p]=iter_lamb_loss(pd,A,g,B,pmax,pmin)
n=length(A);
dg=10;
for i=1:n
a(i,1)=A(i,1);
b(i,1)=A(i,2);
c(i,1)=A(i,3);
end
while ( abs(dg)>0.0001 )
for u=1:n
den(u,1)=(2*(c(u)+g*B(u,u)));

34
den1(u,1)=(2*(c(u)+g*B(u,u)).^2);
num1(u,1)=(c(u)+B(u,u)*b(u));
end
p=(g-b)./den;
for k=1:n
if p(k) > pmax(k)
p(k)=pmax(k);
elseif p(k)< pmin(k)
p(k)=pmin(k);
else, end
end
pl=sum((B)*(p.^2));
dp=pd-sum(p)+pl;
s=num1./den1;
dg = dp/sum(s);
g=g+dg;
lamda=g;
end
cost=sum([sum(a) sum(b.*p) sum(c.*(p.^2))]);

14. Write down the MATLAB result in Table-1.


15. Compare both the results to verify that the calculated results are in accordance with
MATLAB.

EXERCISE:
The fuel cost functions for three thermal plants in $/h are given by:
F  200  7.0P  0.008P2
1 1 1

F  180  6.3P  0.009P2


2 2 2

F  140  6.8P  0.007P2


3 3 3

With following generation limits


10  P1  85

10  P2  80

10  P3  70
The transmission loss is given by the following expression:

P L 0.000218P12  0.000228P22  0.000179P


3
2

35
Where P1, P2 and P3 are in MW. The Total load PD is 150 MW, considering generation limits
and line losses, find the optimal dispatch and the total cost $/h using Lambda Iteration
Method.

RESULTS:
After compiling the MATLAB Program, write down the obtained result in following table and
compare it with the manual calculations:

Table-5.1
Lambda(λ) P1 P2 P3 F1 F2 F3 Total
($/MWhr) (MW) (MW) (MW) ($/hr) ($/hr) ($/hr) Cost($/hr)
Calculated
Values
MATLAB
results

CONCLUSION:
Lambda iteration method is an effective method to solve EDProblem. In this experiment
we have also included generation limits and transmission losses and we came to know that it
takes large number of iterations to solve the problem than the iterations required in case of
simple ED problem (i.e. in case of neglecting the limits & losses or only including the generation
limits).

TASK:
After going through the questions and answers related to the experiment, submit a separate report
which should include the analysis of the results of the experiment.

Teacher / Supervisor’s Signature:

36
EXPERIMENT No. 6
SOLUTION OF ECONOMIC DISPATCH PROBLEM BY NEWTON
METHOD AND GRADIENT METHOD
PURPOSE:
To learn
1. To construct an algorithm to solve Economic Dispatch Problem usingGradient Method
and Newton Method.
2. To Implement algorithm in MATLAB and solve ED Problem for given test system

SOFTWARE USED:
MATLAB

INTRODUCTION:
(i) Gradient Method:
Note that the lambda search technique always requires that one be able to find the power output
of a generator, given an incremental cost for that generator. In the case of a quadratic function
for the cost function, or in the case where the incremental cost function is represented by a
piecewise linear function, this is possible. However, it is often the case that the cost function is
much more complex, such as the one below:
(P  E)
F(P)  A  BP  CP2  D exp[ ]
F
In this case, we shall propose that a more basic method of solution for the optimum be found.
Gradient method works on the principle that the minimum of a function, f(x), can be found by a
series of steps that always take us in a downward direction. From any starting point, xo, we may
find the direction of “steepest descent” by noting that the gradient off.
In this method new value of a variable x is found from the relation:

Where

37
Where f(x) is objective function to be minimized and x is vector of variables.

This process is continued until f =0.  is acceleration factor.

For EDP, gradient method is applied as follows:


Objective function to be minimized and constraints are:

Subjected to:

Lagrange function for this problem is:

And the gradient of this function is:

The economic dispatch requires a starting value of λ and Pl, P2,….The new values of λ, Pl,
P2,…, etc., are found from:

Where

38
PROCEDURE:
The procedure of finding solution of economic dispatch problem using Gradient Method is given
below:

Note:
The problem must be solved by hand and the obtained results must be verified
using MATLAB

1. Identify cost coefficients (ai, bi, ci), power demand (Pd) and its constraints from the
given problem.

2. Calculate initial value of Lambda by first supposing the initial values of Pi using
following equation:
1 n d F (P 0)
0   i i
n i 1 dp
3. Form a vector of initial values of power and lambda as:

4. Calculate by using gradient function:

39
5. Compute new values of powers and lambda by the equation:

6. Repeat steps 3, 4 and 5 until gets equal to zero.


7. Calculate the individual cost of each generator by substituting the value of final power in
the respective fuel cost equations.
8. Calculate total cost of generation by adding up the individual costs as
n n

FTotal   Fi   (ai  bi Pi  ci P 2
i )
i 1 i 1
9. The obtained results are also verified through MATLAB Program. Open a new M-file in
MATLAB and type the following code:
MATLAB CODE:
function [p,sump,lamda,cost]=gradient_method(cost,pd,p,alpha,iter)
%cost=[561 7.92 0.001562;310 7.85 0.00194;78 7.97 0.00482];
%pd=800;
%p=[300 200 300];
%alpha=1;
%iter=10;
n=length(cost);
nlang=50;
j=1;
for i=1:n
a(i,1)=cost(i,1);
b(i,1)=cost(i,2);
y(i,1)=cost(i,3);
end
lamda =(1/3)*sum(b+2*y.*p');
while(j<iter);
x=p';
x(4,1)=lamda;
nlang=b+2*y.*p'-lamda;
nlang(4,1)=pd-sum(p');
x=x-(alpha*nlang);
p=x(1:3);
p=p';
lamda=x(4,1);
sum(p);

40
j=j+1;
end
p=p';
sump=sum(p);
lamda;
cost=sum([sum(a) sum(b.*p) sum(y.*p.*p)]);

10. Write down the MATLAB result in Table-1.


11. Compare both the results to verify that the calculated results are in accordance with
MATLAB.

EXERCISE:
The fuel cost functions for three thermal plants in $/h are given by:
F  561  7.92P  0.001562P2
1 1 1

F  310  7.85P  0.00194P2


2 2 2

F  78  7.97P  0.00482P2
3 3 3

With following generation limits


150  P1  600

100  P2  400

50  P3  200

Where P1, P2 and P3 are in MW. The Total load PD is 800 MW, considering generation limits
and line losses, find the optimal dispatch and the total cost $/h using Gradient Method.
RESULTS:
After compiling the MATLAB, write down the MATLAB results here and compare it with the
manual calculations:

Table 6.1
Lambda(λ) P1 P2 P3 F1 F2 F3 Total
($/MWhr) (MW) (MW) (MW) ($/hr) ($/hr) ($/hr) Cost($/hr)
Calculated
Values
MATLAB
results

41
(ii) NEWTON METHOD:
Newton Method is also an iterative procedure but it uses a technique other than used in λ-
iteration method.

For EDP, newton method is applied as follows:


Objective function to be minimized and constraints are:

Subjected to:

The Langrange function for this problem is:

And gradient of above function is same as we computed in Gradient Method, However in


Newton Method Hessian Matrix is also computed by taking 2nd derivative of gradient function:

Generally, Newton's method will solve for the correction that is much closer to the minimum
generation cost in one step than would the gradient method.

PROCEDURE:
The procedure to find solution of Economic Dispatch (ED) problem through Newton’s Method is
given below:

42
Note:
The problem must be solved by hand and the obtained results must be verified
using MATLAB

1. Identify cost coefficients (ai, bi, ci), power demand (Pd) and its constraints from the
given problem.
2. Take initial value of lambda equal to zero.
3. Form a vector of initial values of power and lambda as:

4. Calculate and Hessian Matrix by using following relation:

5. Compute the correction matrix by using following equation:

6. Add the correction matrix in the matrix of step 3.


7. Repeat steps 4, 5 and 6 until gets equal to zero.
8. Calculate the individual cost of each generator by substituting the value of final power in
the respective fuel cost equations.
9. Calculate total cost of generation by adding up the individual costs as:

43
n n

FTotal   Fi  (a i  bi Pi  ci P


2
i )
i 1 i 1
10. Record the final result in Table-1.
11. The obtained results are also verified through MATLAB Program. Open a new M-file in
MATLAB and type the following code:

MATLAB CODE:
function [p,sump,lamda,cost]=gradient_method(cost,pd,p,iter)
cost=[561 7.92 0.001562;310 7.85 0.00194;78 7.97 0.00482];
pd=800;
p=[300 200 300];
iter=10;
n=length(cost);
nlang=50;
j=1;
for i=1:n
a(i,1)=cost(i,1);
b(i,1)=cost(i,2);
y(i,1)=cost(i,3);
end
lamda =0;
H=[0.003124 0 0 -1;0 0.00388 0 -1;0 0 0.00964 -1;-1 -1 -1 0];
while(j<iter);
x=p';
x(4,1)=lamda;
nlang=b+2*y.*p'-lamda;
nlang(4,1)=pd-sum(p');
x=x-(inv(H)*nlang);
p=x(1:3);
p=p';
lamda=x(4,1);
sum(p);
j=j+1;
end
p=p';
sump=sum(p);
lamda;
cost=sum([sum(a) sum(b.*p) sum(y.*p.*p)]);

12. Write down the MATLAB result in Table-1.

44
13. Compare both the results to verify that the calculated results are in accordance with
MATLAB.

EXERCISE:
The fuel cost functions for three thermal plants in $/h are given by:
F  561  7.92P  0.001562P2
1 1 1

F  310  7.85P  0.00194P2


2 2 2

F  78  7.97P  0.00482P2
3 3 3

With following generation limits


150  P1  600

100  P2  400

50  P3  200

Where P1, P2 and P3 are in MW. The Total load PD is 800 MW, considering generation limits
and line losses, find the optimal dispatch and the total cost $/h using Newton Method.

RESULTS
After compiling the MATLAB, write down the MATLAB results here and compare it with the
manual calculations:

Table 6.2
Lambda(λ) P1 P2 P3 F1 F2 F3 Total
($/MWhr) (MW) (MW) (MW) ($/hr) ($/hr) ($/hr) Cost($/hr)
Calculated
Values
MATLAB
results

CONCLUSION:
Newton and gradient method converge in fewer number of iterations than conventional lambda
iterative techniques but these methods are more complex as compared to lambda iterative
techniques.

TASK:

45
After going through the questions and answers related to the experiment, submit a separate report
which should include the analysis of the results of the experiment.

Teacher / Supervisor’s Signature:

46
EXPERIMENT No.7
SOLUTION OF UNIT COMMITMENT PROBLEM BY ENUMERATION
METHOD
PURPOSE:
To learn
1. Mathematical formulation of Unit Commitment (UC) problem
2. Solution of Unit Commitment problem using Enumeration Method

SOFTWARE USED:
MATLAB

INTRODUCTION:
The Unit Commitment (UC) is an important research challenge and vital optimization
task in the daily operational planning of modern power systems due to its combinatorial nature.
Because the total load of the power system varies throughout the day and reaches a different
peak value from one day to another, the electric utility has to decide in advance which generators
to start up and when to connect them to the network and the sequence in which the operating
units should be shut down and for how long. The computational procedure for making such
decisions is called unit commitment, and a unit when scheduled for connection to the system is
said to be committed.
In general, the UC problem may be formulated as a non-linear, large scale, mixed-integer
combinatorial optimization problem with both binary (unit status variable) and continuous (unit
output power) variables.

Objective Function:
The principal objective is to prepare on/off schedule of the generating units in every sub-period
(typically 1h) of the given planning period (typically 1 day or 1 week) in order to serve the load
demand and spinning reserve at minimum total production cost (fuel cost, startup cost, and shut
down cost), while meeting all unit, and system constraints.
The following costs are considered.
(i) Fuel Cost
The quadratic approximation is mostly used for fuel cost function and it is mathematically
represented as:

47
F(𝑃𝑖) = 𝑎𝑖 + 𝑏𝑖𝑃𝑖 + 𝑐𝑖𝑃2 … … . . (𝑅⁄ )
𝑖 ℎ
(ii) Start-up Cost
Start-up cost is warmth-dependent. Mathematically it is represented as a step function:
𝑆𝑇𝑖ℎ = 𝐻𝑜𝑡 − 𝐶𝑜𝑠𝑡: 𝑇𝐷𝑜𝑤𝑛 ≤ 𝑋𝑂𝑓𝑓(ℎ) ≤ (𝑇𝐷𝑜𝑤𝑛 + 𝐶𝑜𝑙𝑑 − 𝑆𝑡𝑎𝑟𝑡 𝐻𝑜𝑢𝑟𝑠)
𝑖 𝑖 𝑖
𝑆𝑇𝑖ℎ = 𝐶𝑜𝑙𝑑 − 𝐶𝑜𝑠𝑡: 𝑋𝑂𝑓𝑓(ℎ) > (𝑇𝐷𝑜𝑤𝑛 + 𝐶𝑜𝑙𝑑 − 𝑆𝑡𝑎𝑟𝑡 𝐻𝑜𝑢𝑟𝑠)
𝑖 𝑖
(iii) Shut down Cost
The typical value of the shut down cost is zero in the standard systems. This cost isconsidered as
a fixed cost:
𝑆𝐷𝑖ℎ = 𝐾𝑃𝑖ℎ … … … (𝑅⁄ℎ)
Where K is the incremental shut-down cost.
Thus objective function of the unit commitment problem is to minimize the total production cost
and is mathematically formulated as:
𝐻 𝑁

𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑇𝑃𝐶 = ∑ ∑[𝐹𝑖(𝑃𝑖ℎ) + 𝑆𝑇𝑖ℎ + 𝑆𝐷𝑖ℎ]


ℎ=1 𝑖=1
The UC Problem is subjected to many constraints that include:
o The total power generated must meet the load demand.
o There must be enough spinning reserve to cover any shortfalls in generation.
o The loading of each unit must be within its minimum and maximum allowable rating
(limits).
o The minimum up and down times of each unit must be observed.
o Unit availability constraint is either unit is available / not available, out aged/Must out,
o Must run, and Fixed Output Power (F.O.P).
o Unit initial status +/- either already up or already down.
The constraints which are taken into consideration in this experiment are power balance
equation, spinning reserve and loading limits only.

ENUMERATON METHOD:
This method takes all the combinations (2N– 1)H and then calculated the economic dispatch of
each unit. Where N = number of units, H = number of hours (24). For a total period of H
interval, the maximum number of possible combinations is (2N-1)H. For example, take a 24-h
period (e.g. 24 one hour intervals) and consider with 5, 10, 20 and 40 units. The value of (2N-1)H
becomes the following:

48
These very large numbers are the upper bounds for the numbers of enumerations required. The
constraints on the units and the loading capacity of the units limit the search space. Never the
less, the real practical barrier in the UCP is the high dimensionality of the possible search space.

PROCEDURE:
The procedure to find solution of unit commitment problem for a given power system is given
below:
1. Write down all the possible combinations of generation units using the relation (2N-1).
2. Calculate the minimum and maximum generation capacity of each combination by using
the given loading limits.
3. Find out the feasible combinations among all combinations that can satisfy the given
power demand. (Those combinations whose maximum generation capacity as calculated
in step-2 is greater than given load demand)
4. For every feasible combination, calculate lambda (λ) using analytical method by
considering only the units that are in the ON state.
n
PD   i
b
Lamda() i 1 2ci
n

  2c1
i 1 i

2. Calculate generation sharing of individual generators using the equation

  bi
Pi 
2ci
3. Calculate the individual cost of each generator by substituting the value of power
(obtained in step-3) in the respective fuel cost equations and write down in Table-1.
4. Calculate total cost of generation by adding up the individual costs as
n n

FTotal   Fi   (ai  bi Pi  ci P 2
i )
i 1 i 1
And record the results in Table-1
5. Select the combination with the lowest cost which is the most feasible combination.
6. Now obtained results are verified through MATLAB. Open a new M-file in MATLAB
and type the following code:
MATLAB CODE:
function [p1,lamda1,cost1]=lamda_iteration(cost1,pu1,pl1,pd1,lamda1)

49
n1=length(pl1);
dp1=500;
for i1=1:n1
a1(i1,1)=cost1(i1,1);
b1(i1,1)=cost1(i1,2);
y1(i1,1)=cost1(i1,3);
end
while(abs(dp1)>5)
p1=(lamda1-b1)./(2*y1);
for j1=1:n1
if(p1(j1,1)>pu1(1,j1))
p1(j1,1)=pu1(1,j1);
end
if(p1(j1,1)<pl1(1,j1))
p1(j1,1)=pl1(1,j1);
end
end
dp1=pd1-sum(p1);
dlamda1=dp1/sum(1./(2*y1));
lamda1=lamda1+dlamda1;
end
cost1=sum( [sum(a1) sum(b1.*p1) sum(y1.*p1.*p1)]);
end

function [p]=unit_commitment(cost,pu,pl,pd,lamda)
%cost= [500 5.3 0.004;400 5.5 0.006;200 5.8 0.009;500 4.7 0.007];
%pu=[450 350 225 400];
%pl=[200 150 100 150];
%pd=800;
%lamda=6;
n=length(pl);
com=2^n;
com=com-1;
for i=1:com
a=dec2bin(i);
g=log2(i);
g=fix(g);
for j=0:g
p(i+1,g+1-j)=str2num(a(1,j+1));
end

50
end
for t=1:(com+1)
p(t,n+1)=0;
p(t,n+2)=0;
end
for k=1:(com+1)
for q=1:n
if p(k,q)==1
p(k,n+1)=p(k,n+1)+pl(1,q);
p(k,n+2)=p(k,n+2)+pu(1,q);
end
end
end
for v=1:(com+1)
f=1;
if p(v,n+2)>=pd
for u=1:n
if p(v,u)==1
e(f,1)=cost(u,1);
e(f,2)=cost(u,2);
e(f,3)=cost(u,3);
pl1(1,f)=pl(1,u);
pu1(1,f)=pu(1,u);
f=f+1;
end
end
[p1,lamda1,cost1]=lamda_iteration (e,pu1,pl1,pd,lamda);
r=1;
for x=1:n
if p(v,x)==1
p(v,n+2+x)=p1(r,1);
r=r+1;
end
end
end
end
n2=length(pl);
for i2=1:n2
a2(i2,1)=cost(i2,1);
b2(i2,1)=cost(i2,2);

51
y2(i2,1)=cost(i2,3);
end
for z=1:n
for b=1:(com+1)
if p(b,n+2+z)>0
p(b,2*n+2+z)=a2(z,1)+b2(z,1)*p(b,n+2+z)+y2(z,1)*p(b,n+2+z)*p(b,n+2+z);
end
end
end
for d=1:(com+1)
p(d,3*n+3)=0;
for h=1:n
p(d,3*n+3)=p(d,2*n+2+h)+p(d,3*n+3);
end
end

EXERCISE:
3- machine system given for the Unit Commitment Problem is as:
𝐻1(𝑃1) = 510 + 7.2𝑃1 + 0.00142𝑃12 ; 150 ≤ 𝑃1 ≤ 600 F.C = 1.1 $ / MBtu
𝐻2(𝑃2) = 310 + 7.85𝑃2 + 0.00194𝑃22 ; 100 ≤ 𝑃2 ≤ 400 F.C = 1.0 $ / MBtu
𝐻3(𝑃3) = 78 + 7.94𝑃3 + 0.00482𝑃32 ; 50 ≤ 𝑃3 ≤ 200 F.C = 1.2 $ / MBtu
Pd = 550 MW
Solve it using Enumeration Method.
RESULTS:
After compiling the MATLAB program write down the obtained results in following table and
compare it with manual calculations.

Table 7.1
Combinations Pmax Pmin Lambda P1 P2 P3 C1 C2 C3 CT

52
CONCLUSION:
Unit Commitment is a problem on broad basis i.e. to select units from a no. of available
stations to meet forecasted load on the system during certain period. Economic Dispatch
Problem is a step within UC which is performed for all possible combinations. Also
economic dispatch is performed later when UC has already been done to minimize the
cost.

TASK:
After going through the questions and answers related to the experiment, submit a
separate report which should include the analysis of the results of the experiment.

Teacher / Supervisor’s Signature:

53
Experiment 8:

8a: Numerical solution of non-linear equations using Euler’s method,


modified Euler’s method, ode23 and ode45

8b: Single-Machine Stability Study using ode23 and ode45 (Simulink)

Task 8-a
Reading Material: Topic 11.7, Chapter 11: “Stability”, Book: “Power System Analysis by Hadi
Sadaat”.

Ordinary Differential Equations (ODE)


An equation that involves one or more derivatives of the unknown function is called an ordinary
differential equation, abbreviated as ODE. The order of the equation is determined by the order of
the highest derivative. The problems of solving an ODE are classified into initial-value problems
(IVP) and boundary-value problems (BVP), depending on how the conditions at the endpoints of
the domain are specified. All the conditions of an initial-value problem are specified at the initial
point. On the other hand, the problem becomes a boundary-value problem if the conditions are
needed for both initial and final points as shown below:

Initial Value Problems (IVP)


𝑑𝑢
= 𝑓(𝑡, 𝑢(𝑡)), 𝑡 ≥ 𝑡0
𝑑𝑡
𝑢(𝑡0) = 𝑢0

Boundary Value Problems (BVP)

𝑦′′(𝑥) = 𝑓(𝑥, 𝑦, 𝑦′), 𝑎≤𝑥≤𝑏


𝑦(𝑎) =∝, 𝑦(𝑏) = 𝛽

Numerical Methods

54
Numerical methods are used for those problems where exact solution is difficult to obtain and
these can give an approximate solution to (almost) any equation. In power system stability
analysis, we usually encounter swing equation which is a non-linear equation and solution can be
obtained using numerical methods like Euler method and Runge-Kutta methods. In Task 6-a, we
will have a brief overview of these methods and in Task 6-b we will apply them for obtaining
solution of a swing equation for a single machine system.

EULER METHODS
The Euler methods are simple methods for solving first-order ODE, particularly suitable for quick
programming because of simplicity but accuracy is not high. The three versions of Euler methods
involve:

 Forward Euler Method


The forward Euler method for 𝑦′ = 𝑓(𝑦, 𝑥) is derived by rewriting the forward difference
approximation,
𝑦𝑛+1 − 𝑦𝑛
≈ 𝑦𝑛′

to

𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑦𝑛, 𝑥𝑛)


where 𝑦′ = 𝑓(𝑦 , 𝑥 ) is used. In order to advance time steps, previous equation is
𝑛 𝑛 𝑛
recursively applied as:

𝑦1 = 𝑦0 + ℎ𝑦′0

𝑦1 = 𝑦0 + ℎ𝑓(𝑦0, 𝑥0)
and can be generalized as

𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑦𝑛, 𝑥𝑛)

 Modified Euler Method


This method is more accurate than the forward Euler method and is more stable. It is
derived by applying the trapezoidal rule to the solution of 𝑦′ = 𝑓(𝑦, 𝑥)

𝑦𝑛+1 = 𝑦𝑛 + [𝑓(𝑦𝑛+1, 𝑥𝑛+1) + 𝑓(𝑦𝑛, 𝑥𝑛 )]
2
 Backward Euler Method
The backward Euler method is based on the backward difference approximation and
written as

𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑦𝑛+1, 𝑥𝑛+1)

55
The accuracy of this method is quite the same as that of the forward Euler method.

Steps for MATLAB implementation


By implementing in MATLAB, the details of typical steps of Euler’s method will be illustrated to
you, so that it will be clear about computations which are actually being executed. For some
reasons, MATLAB does not include Euler functions and therefore coding has to be done for it.
However, MATLAB has functions using Runge-Kutta algorithms i.e., ode23 and ode45 which will
be discussed in Part (II).

The typical steps of Euler’s method are given below:

1. Define 𝑓(𝑥, 𝑦)
2. Input initial values 𝑥0 and 𝑦0
3. Input step sizes ℎ and number of steps 𝑛
4. Calculate 𝑥 and y
for i=1:n
x=x+h
y=y+hf(x,y)
end
5. Output 𝑥 and y
6. End

Part (I)
𝒅𝒚 𝒙
= , 𝒚(𝟎) = 𝟏
𝒅𝒙 𝒚

A) Find the analytical solution of above ODE manually

B) Suppose we now want to approximate 𝒚(𝟑 × 𝒉) using the Euler’s methods with step
sizes 𝒉 = 𝟎. (𝒚𝒐𝒖𝒓 𝒓𝒆𝒈𝒊𝒔𝒕𝒓𝒂𝒕𝒊𝒐𝒏 𝒏𝒖𝒎𝒃𝒆𝒓) {example: 2014-EE-10 h=0.10, 2014-
EE-4, h=0.4, 2014-EE-251 h=0.251}
ℎ=

56
𝑥0 = 0, 𝑦0 = 1

𝑥1 = , 𝑥2 = , 𝑥3 = 3 × ℎ =

𝑦1 = 𝑦0 + ℎ𝑓(𝑥0, 𝑦0) =

𝑦2 =

𝑦3 =

Now find 𝑦(3 × ℎ) directly from the analytical solution obtained in A) and name it is 𝑦(𝑥)
𝑦(3 × ℎ) =

Calculate Error
|𝑦(𝑥) − 𝑦3|
× 100 =
𝑦(𝑥)

Reduce step size ℎ to ℎ𝑛𝑒𝑤 = 0.0(𝑦𝑜𝑢𝑟 𝑟𝑒𝑔𝑖𝑠𝑡𝑟𝑎𝑡𝑖𝑜𝑛 𝑛𝑢𝑚𝑏𝑒𝑟). {Example: 2014-EE-


101, 𝒉 = 𝟎. 𝟎𝟏𝟎𝟏} and recalculate error and state your findings.

[Hint: You may have to change 𝑦3 in the error formula now]

Keep 𝑦(3 × ℎ𝑜𝑙𝑑)

Modified Step Size ℎ𝑛𝑒𝑤 =

Error =

57
C) Create User-Defined Function Files
//Euler Forward//

eulerforward.m has been created here for your guidance.

function [x,y]=euler_forward(f,xinit,yinit,xfinal,n)
% Euler approximation for ODE initial value problem
% Euler forward method
% Calculation of h from xinit, xfinal, and n
h=(xfinal-xinit)/n;
% Initialization of x and y as column vectors
x=[xinit zeros(1,n)]; y=[yinit zeros(1,n)];
% Calculation of x and y
for i=1:n
x(i+1)=x(i)+h;
y(i+1)=y(i)+h*f(x(i),y(i));
end
end
Create eulerbackward.m and eulermodified.m in a similar fashion.

D) Solve the problem by putting data and called functions into a script file named as
‘electrical.m’. Calculate exact solution, estimate errors and plot all results (i.e., exact
solution, eulerforward, eulerbackward and eulermodified) on a same plot. [Hint: You
may have to use legend command for this purpose].

//Write equation for your given function//

//Calculate Exact Solution. You have to write equation obtained in A) here and
compute 𝒚 by defining a vector 𝒙 //

//Call Functions//

//Plot//

58
//Estimate Errors//

E) Compare the Results

Error
h= Forward Backward Modified

Result:

Part (II):
MATLAB has several different functions (built-ins) for the numerical solution of ODEs.
Instead of writing our own MATLAB code as we did in the Part (I) we will call the built-in
function. These solvers can be used with the following syntax:

[𝑥, 𝑦] = 𝑠𝑜𝑙𝑣𝑒𝑟(′𝑜𝑑𝑒𝑓𝑢𝑛′, 𝑡𝑠𝑝𝑎𝑛, 𝑦0)

Solver is the solver you are using, such as name, ode45 or ode23. ‘odefun’ is the function that
defines the derivatives, so odefun defines 𝑦′ as a function of the independent parameter. tspan
is a vector that specifies the interval of the solution. 𝑦0 is the intial value of 𝑦. [x,y] is the
output, which is the solution of the ODE.

Solver Accuracy Description


ode45 Medium This should be the first solver you try
ode23 Low Less accurate than ode45
ode113 Low to High For computationally intensive problems
ode15s Low to Medium Use if ode45 failed

59
A) Use ode45 and ode23 to obtain solution for the ODE given in Part (I) and compare
both with the results obtained using exact solution. Plot all results on a same graph.
Attach all plots with this handout.

tspan=[𝒙𝟎, 𝒙𝒇𝒊𝒏𝒂𝒍] = [ ]

B) Compare ode45, ode23 with Euler methods and state which algorithm is most
appropriate to be used if step size is large.

Task 8-b
Reading Material: Topic 11.8, Chapter 11: “Stability”, Book: “Power System Analysis by Hadi
Sadaat”.

In Task 6-b, we’ll numerically obtain the solution of the swing equation using ode23 and ode45
solvers. A function named 𝑠𝑤𝑖𝑛𝑔𝑚𝑒𝑢 (𝑃𝑚, 𝐸, 𝑉, 𝑋, 𝑋2, 𝑋3, 𝐻, 𝑓, 𝑡𝑐, 𝑡𝑓, 𝐷𝑡) is written below for the
transient stability analysis of a one machine system.

Swingmeu Function
% This program solves the swing equation of a one-machine system

% when subjected to a three-phase fault with subsequent clearance

% of the fault. Modified Euler method

60
%

% Copyright (c) 1998-2010 H. Saadat

function swingmeu(Pm, E, V, X1, X2, X3, H, f, tc, tf, Dt)

%global Pm f H E V X1 X2 X3

clear t

if exist('Pm')~=1

Pm = input('Generator output power in p.u. Pm = '); else, end

if exist('E')~=1

E = input('Generator e.m.f. in p.u. E = '); else, end

if exist('V')~=1

V = input('Infinite bus-bar voltage in p.u. V = '); else, end

if exist('X1')~=1

X1 = input('Reactance before Fault in p.u. X1 = '); else, end

if exist('X2')~=1

X2 = input('Reactance during Fault X2 = '); else, end

if exist('X3')~=1

X3 = input('Reactance after Fault X3 = '); else, end

if exist('H')~=1

H = input('Generator Inertia constant in sec. H = '); else, end

if exist('f')~=1

f = input('System frequency in Hz f = '); else, end

if exist('Dt')~=1

Dt = input('Time interval Dt = '); else, end

if exist('tc')~=1

61
tc = input('Clearing time of fault in sec tc = '); else, end

if exist('tf')~=1

tf = input('Final time for swing equation in sec tf = '); else, end

Pe1max = E*V/X1; Pe2max=E*V/X2; Pe3max=E*V/X3;

clear t x1 x2 delta

d0 =asin(Pm/Pe1max);

t(1) = 0;

x1(1)= d0;

x2(1)=0;

np=tf /Dt;

Pemax=Pe2max;

ck=pi*f/H;

for k = 1:np

if t(k) >= tc

Pemax=Pe3max;

else, end

t(k+1)=t(k)+Dt;

Dx1b=x2(k);

Dx2b=ck*(Pm-Pemax*sin(x1(k)));

x1(k+1)=x1(k)+Dx1b*Dt;

x2(k+1)=x2(k)+Dx2b*Dt;

Dx1e=x2(k+1);

Dx2e=ck*(Pm-Pemax*sin(x1(k+1)));

Dx1=(Dx1b+Dx1e)/2;

62
Dx2=(Dx2b+Dx2e)/2;

x1(k+1)=x1(k)+Dx1*Dt;

x2(k+1)=x2(k)+Dx2*Dt;

end

delta=180*x1/pi;

clc

fprintf('\nFault is cleared at %4.3f Sec. \n', tc)

head=[' '

' time delta Dw '

' s degrees rad/s'

' '];

disp(head)

disp([t', delta' x2'])

h=figure; figure(h)

plot(t, delta), grid

title(['One-machine system swing curve. Fault cleared at ', num2str(tc),'s'])

xlabel('t, sec'), ylabel('Delta, degree')

cctime(Pm, E, V, X1, X2, X3, H, f) % Obtains the critical clearing time

In addition to this, based on the MATLAB automatic step size Runge Kutta ode23 and ode45
functions, two more functions are developed for the transient stability analysis of a one machine
system. These are swingrk2 based on ode23 and swingrk4 based on ode45. Both of these
functions are given below.

Swingrk2 Function
% This program solves the swing equation of a one-machine system

63
% when subjected to a three-phase fault with subsequent clearance

% of the fault.

% Copyright 1998-2010 H. Saadat

function swingrk4(Pm, E, V, X1, X2, X3, H, f, tc, tf, Dt)

%global Pm f H E V X1 X2 X3

if exist('Pm') ~= 1

Pm = input('Generator output power in p.u. Pm = '); else, end

if exist('E') ~= 1

E = input('Generator e.m.f. in p.u. E = '); else, end

if exist('V') ~= 1

V = input('Infinite bus-bar voltage in p.u. V = '); else, end

if exist('X1') ~= 1

X1 = input('Reactance before Fault in p.u. X1 = '); else, end

if exist('X2') ~= 1

X2 = input('Reactance during Fault X2 = '); else, end

if exist('X3') ~= 1

X3 = input('Reactance after Fault X3 = '); else, end

if exist('H') ~= 1

H = input('Generator Inertia constant in sec. H = '); else, end

if exist('f') ~= 1

f = input('System frequency in Hz f = '); else, end

if exist('tc') ~= 1

tc = input('Clearing time of fault in sec tc = '); else, end

64
if exist('tf') ~= 1

tf = input('Final time for swing equation in sec tf = '); else, end

Pe1max = E*V/X1; Pe2max=E*V/X2; Pe3max=E*V/X3;

clear t x delta

d0 =asin(Pm/Pe1max);

t0 = 0;

x0 = [d0; 0];

%tol=0.001;

%[t1,xf] =ode23('pfpower', t0, tc, x0, tol); % During fault solution

tspan = [t0, tc];

[t1,xf] =ode23('pfpower', tspan, x0); % During fault solution

x0c =xf(length(xf), :);

%[t2,xc] =ode23('afpower', tc, tf, x0c, tol); % After fault solution

tspan = [tc, tf];

[t2,xc] =ode23('afpower', tspan, x0c); % After fault solution

t =[t1; t2]; x = [xf; xc];

delta = 180/pi*x(:,1);

clc

fprintf('\nFault is cleared at %4.3f Sec. \n', tc)

head=[' '

' time delta Dw '

' s degrees rad/s'

' '];

disp(head)

65
disp([t, delta, x(:, 2)])

h=figure; figure(h)

plot(t, delta), grid

title(['One-machine system swing curve. Fault cleared at ', num2str(tc),'s'])

xlabel('t, sec'), ylabel('Delta, degree')

cctime(Pm, E, V, X1, X2, X3, H, f) % Obtains the critical clearing time

Swingrk4 Function
% This program solves the swing equation of a one-machine system

% when subjected to a three-phase fault with subsequent clearance

% of the fault.

% Copyright (c) 1998-2010 H. Saadat

function swingrk4(Pm, E, V, X1, X2, X3, H, f, tc, tf, Dt)

%global Pm f H E V X1 X2 X3

if exist('Pm') ~= 1

Pm = input('Generator output power in p.u. Pm = '); else, end

if exist('E') ~= 1

E = input('Generator e.m.f. in p.u. E = '); else, end

if exist('V') ~= 1

V = input('Infinite bus-bar voltage in p.u. V = '); else, end

if exist('X1') ~= 1

X1 = input('Reactance before Fault in p.u. X1 = '); else, end

66
if exist('X2') ~= 1

X2 = input('Reactance during Fault X2 = '); else, end

if exist('X3') ~= 1

X3 = input('Reactance after Fault X3 = '); else, end

if exist('H') ~= 1

H = input('Generator Inertia constant in sec. H = '); else, end

if exist('f') ~= 1

f = input('System frequency in Hz f = '); else, end

if exist('tc') ~= 1

tc = input('Clearing time of fault in sec tc = '); else, end

if exist('tf') ~= 1

tf = input('Final time for swing equation in sec tf = '); else, end

Pe1max = E*V/X1; Pe2max=E*V/X2; Pe3max=E*V/X3;

clear t x delta

d0 =asin(Pm/Pe1max);

t0 = 0;

x0 = [d0; 0];

tol=0.001;

%[t1,xf]=ode45('pfpower', t0, tc, x0, tol); % During fault solution

tspan = [t0; tc];

[t1,xf]=ode45('pfpower', tspan, x0); % During fault solution

x0c =xf(length(xf), :);

%[t2,xc] =ode45('afpower', tc, tf, x0c, tol); % After fault solution

67
tspan = [tc, tf];

[t2,xc] =ode45('afpower', tspan, x0c); % After fault solution

t =[t1; t2]; x = [xf; xc];

delta = 180/pi*x(:,1);

clc

fprintf('\nFault is cleared at %4.3f Sec. \n', tc)

head=[' '

' time delta Dw '

' s degrees rad/s'

' '];

disp(head)

disp([t, delta, x(:, 2)])

h=figure; figure(h)

plot(t, delta), grid

title(['One-machine system swing curve. Fault cleared at ', num2str(tc),'s'])

xlabel('t, sec'), ylabel('Delta, degree')

cctime(Pm, E, V, X1, X2, X3, H, f) % Obtains the critical clearing time

The above two functions use another function named as cctime which obtains the critical clearing
time of fault for critical stability and is given below:

Cctime Function
% This function simulates the swing equation of a one-machine system

% and returns the critical clearing time for stability.

% Copyright (C) 1998-2010 H. Saadat

68
%

function cctime(Pm, E, V, X1, X2, X3, H, f)

Pe1max = E*V/X1; Pe2max=E*V/X2; Pe3max=E*V/X3;

d0 =asin(Pm/Pe1max);

dmax = pi-asin(Pm/Pe3max);

cosdc = (Pm*(dmax-d0)+Pe3max*cos(dmax)-Pe2max*cos(d0))/(Pe3max-Pe2max);

if abs(cosdc) > 1

fprintf('No critical clearing angle could be found.\n')

k fprintf('System can remain stable during this disturbance.\n\n')

return

else

end

dc = acos(cosdc);

if dc > dmax

fprintf('No critical clearing angle could be found.\n')

fprintf('System can remain stable during this disturbance.\n\n')

return

else

end

tf = 0.4;

x0 = [d0; 0];

%[t1,xf] =ode23('pfpower', 0, tf, x0, 0.00001);

tspan = [0, tf];

options = odeset('RelTol', 0.00001);

[t1,xf] =ode23('pfpower', tspan, x0, options);

69
kk=find(xf(:,1) <= dc); k=max(kk);

tt=t1(k);

while tf <= tt && tf <= 3.6

tf=tf+.4;

fprintf('\nSearching with a final time of %3.2f Sec. \n', tf)

tol=0.00001+tf*2.5e-5;

%[t1,xf] =ode23('pfpower', 0, tf, x0, tol);

tspan = [0, tf];

options = odeset('RelTol', tol);

[t1,xf] =ode23('pfpower', tspan, x0, options);

kk=find(xf(:,1) <= dc); k=max(kk);

tt= t1(k);

end

%end

tmargin = t1(k);

if tf >= 3.6

fprintf('\nA clearing time could not be found up to 4 sec. \n\n')

return

else

end

fprintf('\nCritical clearing time = %4.2f seconds \n', tmargin)

fprintf('Critical clearing angle = %6.2f degrees \n\n', dc*180/pi)

Note:
You may use above codes for swingmeu, cctime, swingrk2 and swingrk4 functions.

70
Part (I):
a) Solve example 11.6 using the swingmeu function and swingrk4 function.

b) Using the state-space representation of the swing equation, develop SIMULINK model. [Hint:
See Figure 11.29]

Part (II):
Consider the system shown in Figure below

The machine of the above system is delivering a real power input of 0.77 per unit to the infinite bus at a
voltage of 1.0 per unit. The generator excitation voltage is E`=1.25 per unit. A three-phase fault at the
middle of one line is cleared by isolating the faulted circuit simultaneously at both ends. [Note: This is
Problem 11.16 from Power System Analysis by Hadi Sadaat]

a) The fault is cleared in 0.2 second. Obtain the numerical solution of the swing equation for
1.5 seconds. Select one of the functions swingmeu, swingrk2, or swingrk4.

b) Repeat the simulation and obtain the swing plots when fault is cleared in 0.4 second, and for the
critical clearing time.

c) Obtain a SIMULINK block diagram model for the swing equation.

Note:
Show your calculation details and attach the printouts of the plots and Simulink Model with this manual.

71
EXPERIMENT No. 9
MODELLING OF DIFFERENT COMPONENTS OF LOAD FREQUENCY
CONTROL FOR THERMAL GENERATING UNIT AND SIMULATION
OF SINGLE AREA POWER SYSTEM

PURPOSE:
To learn

1. Mathematical Modelling of different components of Load Frequency Control (LFC)


using transfer function approach
2. Simulation of LFC mechanism for an isolated power system in MATLAB

INTRODUCTION:
Active power control is one of the important control actions to be perform to be normal operation
of the system to match the system generation with the continuously changing system load in
order to maintain the constancy of system frequency to a fine tolerance level. This is one of the
foremost requirements in proving quality power supply. A change in system load cases a change
in the speed of all rotating masses (Turbine – generator rotor systems) of the system leading to
change in system frequency. The speed change form synchronous speed initiates the governor
control (primary control) action result in the entire participating generator – turbine units taking
up the change in load, stabilizing system frequency. Restoration of frequency to nominal value
requires secondary control action which adjusts the load - reference set points of selected
(regulating) generator – turbine units. The primary objectives of automatic generation control
(AGC) are to regulate system frequency to the set nominal value and also to regulate the net
interchange of each area to the scheduled value by adjusting the outputs of the regulating units.
This function is referred to as load – frequency control (LFC).
MATHEMATICAL MODELLING OF LFC:
The first step in the analysis and design of a control system is mathematical modelling of the
system. The two common methods are the transfer function method and state variable approach.
The state variable approach can be applied to portray linear as well as non-linear system. In order
to use the transfer function and linear state equations the system has to be linearized. Proper
assumption and approximation are made to linearize the mathematical equations describing the
system and a transfer function is obtained for the following components:
(a) Generator Model

72
With the use of swing equation of a synchronous machine to small perturbation, we have

Or in terms of small change in speed

Laplace Transformation gives,

Mathematical Block diagram for a generator


(b) Load Model
The load on a power system consists of variety of electrical drives. The load speed characteristic
of the load is given by:
ΔPe = ΔPL + D Δω
Where ΔPL is the non-frequency sensitive change in load,
DΔω is the load change that is frequency sensitive.
D is expressed as % change in load divided by % change in frequency.

Mathematical Block Diagram of Load


(c) Prime Mover Model
The source of power generation is the prime mover. It can be hydraulic turbines near waterfalls,
steam turbine whose energy come from burning of coal, gas and other fuels. The model of

73
turbine relates the changes in mechanical power output ΔPm and the changes in the steam valve
position ΔPv:

Where the turbine constant is in the range of 0.2-20 second.


(d) Governor Model
When the electrical load is increased suddenly then the electrical power exceeds the input
mechanical power. This deficiency of power in the load side is compensated from the kinetic
energy of the turbine. Due to this reason the energy that is stored in the machine is decreased and
the governor sends signal for supplying more volumes of water, steam or gas to increase the
speed of the prime mover to compensate deficiency in speed.

In s-domain

The command ΔPg is transformed through amplifier to the steam valve position command ΔP V.
We assume here a linear relationship and considering simple time constant we get this s-domain
relation:

Combining all the above block diagrams, for an isolated area system we get the following:

Figure 13.1: Block diagram of LFC

The open loop transfer function of the block diagram shown in above figure is:
1
𝐾𝐺(𝑠)𝐻(𝑠) = (13.1)
𝑅(2𝐻𝑠+𝐷)(1+𝜏𝑔𝑠)(1+𝜏𝑇𝑠)

74
The closed loop transfer function that relates the load change ΔPL to the frequency deviation ΔΏ
is:
∆Ω(𝑠) (1+𝜏𝑔𝑠)(1+𝜏𝑇𝑠) (13.2)
= 1
−∆𝑃𝐿 (2𝐻𝑠+𝐷)(1+𝜏𝑔𝑠)(1+𝜏𝑔𝑠)+ ⁄𝑅

or
∆Ω(𝑠) = −∆𝑃𝐿 (𝑠)𝑇(𝑠) ∆𝑃
(13.3)
The load change is a step input i.e. ∆𝑃 (𝑠) = 𝐿. Utilizing the final value theorem, the steady
𝐿 𝑠
state value of ∆𝑤 is:
1
∆𝑤𝑠𝑠 = lim 𝑠∆Ω(𝑠) = (−∆𝑃𝐿 ) 1 (13.4)
𝑠→0 (𝐷+𝑅)
It is clear that for the case with no frequency sensitive load (D=0), the steady state deviation in
frequency is determined by governor speed regulation and is
∆𝑤𝑠𝑠 = (−∆𝑃𝐿 )𝑅 (13.5)
With several generators with governor speed regulations R2, R3, R4,…, Rn are connected to the
system, the steady state deviation in frequency is given by:
1
∆𝑤𝑠𝑠 = (−∆𝑃𝐿 ) (13.6)
𝐷+1⁄𝑅1+1⁄𝑅2+⋯+1⁄𝑅𝑛
PROCEDURE:
The procedure of implementing Load Frequency Control (LFC) mechanism is given here:
1. For the given isolated power system network, read the value of following parameters of
LFC components; Turbine time constant, Governor time constant, governor inertia
constant, governor speed regulation.
2. Put these parameters into equation to find the closed loop transfer function of LFC block
diagram.
3. Now find the steady state frequency deviation by using the relation (13.5).
4. The computed steady state frequency deviation is also verified by finding the frequency
deviation step response in MATLAB. Open a new M-file in MATLAB and type the
following code:
Pl=0.2;
numc=[0.1 0.7 1];
denc=[1 7.08 10.56 20.8];
t=0:0.2:10;
c=-Pl*step(num,den,c)
plot(t,c)
xlabel(‘t,sec’);
ylabel(‘pu’)
title(‘Frequency deviation step response’)

75
5. To verify the obtained result, the frequency deviation step response can also determine by
simulating the LFC block diagram in MATLAB Simulink. For given test system the
following block diagram is implemented in MATLAB Simulink.

SIMULINK MODEL:

Figure 13.2: Simulink Model


EXERCISE:

An isolated power station has the following parameters


Turbine time constant = 0.5 s
Governor time constant = 0.2 s
Governor inertia constant = 5 s
Governor speed regulation = R per unit
The load varies by 0.8 per cent for a 1 per cent change in frequency (D=0.8)
The governor speed regulation is set to R = 0.05 per unit. The turbine rated output is 250 MW at
nominal frequency 50 Hz. A sudden load change of 50 MW (𝝙PL=0.2 P.U) occurs.
(a) Find steady state Frequency deviation in Hz. Also obtain time domain performance
specifications and the frequency deviation step response.
(b) Construct the Simulink block diagram and obtain the frequency deviation response.

RESULTS:
(i) MANUAL CALCULATIONS:

76
(ii) MATLAB RESULTS:

CONCLUSION:
Changes in real power affect mainly the system frequency, while reactive power is less sensitive
to changes in frequency and it is mainly dependent on changes in voltage magnitude. The
operation objectives of LFC are to maintain reasonably uniform frequency, to divide the load
between generators and to control the tie-line interchange schedules. In this experiment LFC
mechanism for an isolated power system is simulated and simulation result shows that the steady
state deviation in frequency is determined by the governor speed regulation.

TASK:
After going through the questions and answers related to the experiment, submit a separate report
which should include the analysis of the results of the experiment.

Teacher / Supervisor’s Signature:

77
EXPERIMENT NO. 10
AUTOMATIC GENERATION CONTROL OF SINGLE AREA POWER
SYSTEM
PURPOSE:
To learn
1. Determination of frequency deviation of Automatic Generation Control (AGC) system
for isolated power system using transfer function approach
2. Simulation of AGC mechanism for a given isolated power system network in MATLAB

INTRODUCTION:
If the load on the system is increased, the turbine speed drops before the governor can adjust the
input of the steam to new load. As the change in the value of speed diminishes, the error signal
becomes smaller and position of fly ball governor gets closer to the point required to maintain a
speed. However constant speed will not be the set point and there will be an offset. One way to
restore the speed or frequency is to its nominal value is to add an integrator. The integral unit
monitors the average error over the period of time and will overcome the offset. Thus as the
system load changes continuously, the generation is adjusted automatically to restore the
frequency to nominal value. This scheme is known as the automatic generation control.
AGC IN SINGLE AREA SYSTEM:
With the primary LFC loop, a change in the system load will result in a steady state frequency
deviation, depending on the governor speed regulation. In order to reduce the frequency
deviation to zero, we must provide a rest action. The rest action can be achieved by introducing
an integral controller to act on the load reference setting to change the speed test point. The LFC
system, with the addition of the secondary loop is shown in following figure.

Figure 14.1: Block diagram of AGC for single area power system

78
The integral controller gain KI must be adjusted for a satisfactory transient response. The
equivalent block diagram is shown below:

The closed loop transfer function for above system is given below:
∆Ω(s) 𝑠(1+𝜏 𝑠)(1+𝜏 𝑠)
= 𝑠(2𝐻 +𝐷)((1+𝜏𝑔 𝑠)(1+𝜏𝑇 𝑠)+𝐾𝐼+ 𝑠 (14.1)
−∆𝑃𝐿(𝑠) 𝑠 𝑔
𝑅
Or 𝑇

∆Ω(𝑠) = −∆𝑃𝐿(𝑠)𝑇(𝑠) (14.2)


Where T(s) is transfer function.
∆𝑃𝐿
The load change is a step input i.e. ∆𝑃 (𝑠) = . Utilizing the final value theorem, the steady
𝐿 𝑠
state value of ∆𝑤 is:
∆𝑤𝑠𝑠 = lim 𝑠∆Ω(𝑠) = (−∆𝑃𝐿)(0) = 0 (14.3)
𝑠→0
Thus, it shows that with the addition of Integral Controller, the steady state error reaches to zero.

PROCEDURE:
The procedure of implementing Automatic Generation Control (AGC) mechanism in single area
power system is given here:
1. For the given isolated power system network, read the value of following parameters of
AGC components; Turbine time constant, Governor time constant, governor inertia
constant, governor speed regulation, Integral Controller gain.
2. Put these parameters into equation to find the closed loop transfer function of AGC block
diagram.
3. Now find the steady state frequency deviation by using the relation (14.3).
4. The computed steady state frequency deviation is also verified by finding the frequency
deviation step response in MATLAB. Open a new M-file in MATLAB and type the
following code:
Pl=0.2;
KI=7;
numc=[0.1 0.7 1 0];
denc=[1 7.08 10.56 20.8 KI];
t=0:0.2:10;

79
c=-Pl*step(num,den,c)
plot(t,c)
xlabel(‘t,sec’);
ylabel(‘pu’)
title(‘Frequency deviation step response’)
5. To verify the obtained result, the frequency deviation step response can also determine by
simulating the AGC block diagram in MATLAB Simulink. For given test system the
following block diagram is implemented in MATLAB Simulink.

SIMULINK MODEL:

Figure 14.2: Simulink Model


EXERCISE:
An isolated power station has the following parameters
Turbine time constant = 0.5 s
Governor time constant = 0.2 s
Governor inertia constant = 5 s
Governor speed regulation = R per unit
The load varies by 0.8 per cent for a 1 per cent change in frequency (D=0.8)
The governor speed regulation is set to R = 0.05 per unit. The turbine rated output is 250 MW at
nominal frequency 50 Hz. A sudden load change of 50 MW (𝝙PL=0.2 P.U) occurs.

80
The LFC system is equipped with the secondary integral control loop for AGC,
(a) Find the frequency deviation step response using MATLAB step function. Set the
integral control gain to KI=7
(b) Construct the Simulink block diagram and obtain the frequency deviation response for
same conditions.
RESULTS:
(i) MANUAL CALCULATIONS:

(ii) MATLAB RESULTS:

CONCLUSION:
If the load on the system is increased, the turbine speed drops before the governor can adjust the
input of the steam to new load. One way to restore the speed or frequency to its nominal value is
to add an integrator. In this experiment Load frequency control mechanism is simulated with the
addition of integral controller and it is evident from simulation results that frequency deviation
reduced to zero with the addition of integral controller.
TASK:
After going through the questions and answers related to the experiment, submit a separate report
which should include the analysis of the results of the experiment.

Teacher / Supervisor’s Signature:

81
EXPERIMENT NO. 11
AUTOMATIC GENERATION CONTROL FOR MULTI-AREA POWER
SYSTEM
PURPOSE:
To learn
1. Mathematical formulation of AGC problem for two or multi-area power systems
2. Simulation of AGC mechanism for given two area power system in MATLAB
Simulink

INTRODUCTION:
If the load on the system is increased, the turbine speed drops before the governor can adjust the
input of the steam to new load. As the change in the value of speed diminishes, the error signal
becomes smaller and position of fly ball governor gets closer to the point required to maintain a
speed. However constant speed will not be the set point and there will be an offset. One way to
restore the speed or frequency is to its nominal value is to add an integrator. The integral unit
monitors the average error over the period of time and will overcome the offset. Thus as the
system load changes continuously, the generation is adjusted automatically to restore the
frequency to nominal value. This scheme is known as the automatic generation control.
AGC in Multi-Area System:
In many cases, a group of generators are closely coupled internally and swing in a unison.
Furthermore, the generator turbines tend to have the same response characteristics. Such a group
of generators are coherent. Then it is possible to let the LFC loop to represent the whole system
which is referred to as control area. The AGC of multi-area system can be realized first the AGC
for two area system,
Consider two areas represented by an equivalent generated unit interconnected by lossless tie-
line with reactance Xtie. Each area is represented by a voltage source behind an equivalent
reactance is shown below:

Figure 15.1: Reactance diagram for two-area system

82
During Normal operation, the real power transferred over the tie line is given below:

|𝐸1||𝐸2|
𝑃 = 𝑆𝑖𝑛𝛿 (15.1)
12 𝑋12 12

Where X12= X1+ X2+ Xtie.


For a small deviation in the tie-line flow 𝝙P2 from the nominal value i.e.
∆𝑃 = 𝑑𝑃12 ∆𝛿 (15.2)
12 𝑑𝛿12 12

∆𝑃12 = 𝑃𝑆∆𝛿12 (15.3)

The quantity Ps can be defined as:


𝑑𝑃12 |𝐸1||𝐸2| (15.4)
𝑃𝑠 = = 𝐶𝑜𝑠𝛿 120
𝑑𝛿12 𝑋12

The tie-line power deviation then takes the form:


∆𝑃12 = 𝑃𝑆(∆𝛿1 − ∆𝛿2 (15.5)
The tie line power flow appears as a load increase in one area and load decrease in other area,
depending on the direction of flow.
Let us consider a load change 𝝙PL1 in area 1, in the steady state, both areas will have the same
steady-state frequency deviation i.e.
∆𝑤 = ∆𝑤1 = ∆𝑤2
and
∆𝑃𝑚1 − ∆𝑃12 − ∆𝑃𝐿1 = ∆w𝐷1
∆𝑃𝑚2 + ∆𝑃12 = ∆𝑤𝐷2
A block diagram represented the two-area system with LFC only containing the primary loop is
given below:

83
Figure 15.2: Block diagram of AGC mechanism

The change in mechanical power is determined by governor speed characteristics, given by:
−∆𝑤
∆𝑃𝑚1 =
𝑅1
−∆𝑤
∆𝑃𝑚2 =
𝑅2
Solving for 𝝙w, we have
−∆𝑃𝐿1 (15.6)
∆𝑤 = ( 1 +𝐷 1
1)+( +𝐷2)
𝑅1 𝑅2
−∆𝑃𝐿1
∆𝑤 = (15.7)
𝐵1+𝐵2
Where
1
𝐵1 = + 𝐷1 (15.8)
𝑅1
1
𝐵2 = + 𝐷2 (15.9)
𝑅2

B1, B2 are known as frequency bias factors. The change in the tie-line power is
1
( +𝐷2)∆𝑃𝐿1
𝑅2
∆𝑃12 = 1 1
( +𝐷1)( +𝐷2)
(15.10)
𝑅1 𝑅2

84
𝐵2
∆𝑃12 = (−∆𝑃𝐿1 ) (15.11)
𝐵1+𝐵2

PROCEDURE:
The procedure of implementing Automatic Generation Control (AGC) mechanism in two area
power system is given here:
1. For the given two area power system network, keep the value of following parameters of
AGC components for both area 1 and area 2; Turbine time constant, Governor time
constant, governor inertia constant, governor speed regulation.
2. Using these values, find the frequency bias factors for both areas as given in equation
(15.8) and (15.9).
3. After that compute the steady state frequency deviation (Δw) using the relation
mentioned in equation (15.7).
4. Also find the power transferred over the tie line from area 2 to area 1 by using the
relation (15.11).
5. These obtained results (Steady state frequency deviation, Tie Line Power) can also be
verified by simulating the AGC block diagram in MATLAB Simulink. The Simulink
block diagram for example test system is given below:

SIMULINK MODEL:

85
EXERCISE:
A two area system connected by a tie line has the following parameters on a 1000MVA
common base

Area 1 2

Speed Regulation R1=0.05 R2=0.0625

Frequency –sens.load coeff. D1=0.6 D2=0.9

Inertia Constant H1=5 H2=4

Base Power 1000MVA 1000MVA

Governor Time Constant g1 = 0.2sec g1 = 0.3sec

Turbine Time Constant T1 =0.5sec T1 =0.6sec

The units are operating in parallel at the nominal frequency of 60Hz. The synchronizing power
coefficient is computed from the initial operating condition and is given to be Ps = 2 p.u. A load
change of 187.5 MW occurs in area1.

(a) Determine the new steady state frequency and the change in the tie-line flow.
(b) Construct the SIMULINK block diagram and obtain the frequency deviation response for
the condition in part (a).

RESULTS:

(i) MANUAL CALCULATIONS:

86
(ii) MATLAB RESULTS:

CONCLUSION:
In an interconnected system consisting of several power pools, the role of automatic generation
control is to divide the load among system, stations, and generators so as to achieve maximum
economy and correctly control the scheduled interchanges of tie-line power while maintaining a
uniform load frequency.

TASK:
After going through the questions and answers related to the experiment, submit a separate report
which should include the analysis of the results of the experiment.

Teacher / Supervisor’s Signature:

87
EXPERIMENT No. 12
MODELLING OF DIFFERENT COMPONENTS OF AUTOMATIC
VOLTAGE REGULATOR (AVR) SYSTEM FOR THERMAL
GENERATING UNIT AND SIMULATION OF GIVEN TEST SYSTEM
PURPOSE:
To learn
1. Mathematical Modelling of different components of Automatic Voltage Regulator
(AVR) System
2. Simulation of AVR mechanism for a given test system
INTRODUCTION:
The generation exciter system maintains generator voltage and controls the reactive power flow.
The sources of reactive power are generators, capacitors and reactors. The generator reactive
powers are controlled by field excitation. Other supplementary methods of improving voltage
profile on electric transmission systems are transformer load-tap changers, switched capacitors,
step voltage regulators and static VAR control equipment. The primary means of generator
reactive power control is the generation excitation control using Automatic Voltage Regulator
(AVR). The role of AVR is to hold the terminal voltage magnitude of a synchronous generator at
a specified level. The schematic diagram and mathematical modelling of different components
involved in AVR system is given below:

Figure 16.1: Schematic block diagram of AVR

88
MATHEMATICAL MODELLING OF AUTOMATIC VOLTAGE
REGULATOR (AVR):

(a) Amplifier model


The excitation system amplifier may be a magnetic amplifier, rotating amplifier, or modern
electronic amplifier. The amplifier is represented by a gain KA and a time constant. The transfer
function is given below:

𝑉𝑅(𝑠) 𝐾𝐴
=
𝑉𝐸(𝑠) 1 + 𝜏𝐴𝑠
𝑽𝑬(𝒔) 𝑲𝑨 𝑽𝑹(𝒔)
𝟏 + 𝝉𝑨𝒔

(b) Exciter model


A reasonable model of a modern exciter is a linearized model, which takes into account the
major time constant and ignores the saturation or other nonlinearities. In the simplest form the
transfer function of a modern exciter may be represented by a single time constant and a gain KE.

𝑉𝐹(𝑠) 𝐾𝐸
=
𝑉𝑅(𝑠) 1 + 𝜏𝐸 𝑠

𝑲𝑬
𝑽𝑹(𝒔) 𝑽𝑭 (𝒔)
𝟏 + 𝝉 𝑬𝒔

(c) Generator model


The synchronous machine generated emf is a function of the machine magnetization curve and
its terminal voltage is dependent on generator load. In the linearized model, the transfer function
relating the generator terminal voltage to its field voltage can be represented by a gain KG and a
time constant and the transfer function is:

𝑉𝑡(𝑠) 𝐾𝐺
=
𝑉𝐹(𝑠) 1 + 𝜏𝐺 𝑠

89
𝑲𝑮
𝑽𝑭(𝒔) 𝑽𝒕(𝒔)
𝟏 + 𝝉 𝑮𝒔

(d) Sensor model


The voltage is sensed through a potential transformer and in one form it is rectified through a
bridge rectifier. The sensor is modeled by a simple first order transfer function, given by

𝑉𝑆(𝑠) 𝐾𝑅
=
𝑉𝑡(𝑠) 1 + 𝜏𝑅𝑠
𝑲𝑹
𝑽𝒕(𝒔) 𝑽𝑺 (𝒔)
𝟏 + 𝝉𝑹 𝒔

Utilizing the above models results in AVR block diagram

The open loop transfer function is given below:


𝐾𝐴𝐾𝐸𝐾𝐺𝐾𝑅
𝐾𝐺(𝑠)𝐻(𝑠) = (16.1)
(1+𝜏𝐴𝑠)(1+𝜏𝐸𝑠)(1+𝜏𝐺𝑠)(1+𝜏𝑅𝑠)

The closed loop transfer function related to generator terminal voltage and reference voltage is:

𝑉𝑡(𝑠) 𝐾𝐴 𝐾𝐸𝐾𝐺𝐾𝑅(1+𝜏𝑅𝑠)
= (16.2)
𝑉𝑟𝑒𝑓(𝑠) (1+𝜏𝐴𝑠)(1+𝜏𝐸𝑠)(1+𝜏𝐺𝑠)(1+𝜏𝑅𝑠)+𝐾𝐴𝐾𝐸𝐾𝐺𝐾𝑅

𝑉𝑇(𝑠) = 𝑇(𝑠)𝑉𝑟𝑒𝑓(𝑠) (16.3)


1
For a step input 𝑉𝑟𝑒𝑓 (𝑠) = , using the final value theorem, the steady state response is
𝑆

90
𝐾𝐴
𝑉 = lim 𝑠𝑉 (𝑠) = (16.4)
𝑡(𝑠𝑠) 𝑡
𝑠→0 1+𝐾𝐴

PROCEDURE:
The procedure for simulating Automatic Voltage Regulator (AVR) system on a generating unit is
given below:
1. From a given system data, keep the values of gain and time constants of following four
components of AVR; Amplifier, Exciter, Sensor and generator.
2. By using these values, find the closed loop transfer function of AVR block diagram as
given in equation (16.2).
3. With the application of final value theorem, find the steady state step response of above
mentioned system according to the equation (16.4).
4. The obtained response in step 3 can also be verified through MATLAB. Open the new
M-file and type the following code to find steady state step response of the AVR system.
KA=10;
numc=KA*[25 500];
denc=[1 33.5 307.5 775 500+500*KA];
t=0:.05:20;
c=step(numc,denc,t);
plot(t,c);
grid
timespec(numc,denc)
5. The obtained result are further verified by simulating the AVR system in MATLAB
Simulink. For example test system the following block diagram will be simulated in
MATLAB Simulink.
SIMULINK MODEL:

91
Figure 16.2: Simulink Model

EXERCISE:
The AVR system of a generator has the following parameters:

(a) The amplifier gain is set to KA=10. Find the steady state step response and time-domain
performance specifications.
(b) Construct the Simulink block diagram and obtain the step response.
RESULTS:
(i) MANUAL CALCULATIONS:

(ii) MATLAB RESULTS:

92
CONCLUSION:
Changes in reactive power load demand effects the voltage magnitude. It is concluded from this
experiment that AVR mechanism helps to maintain constant voltage despite of changes in
reactive power load demands. Moreover the steady state response can be further improved by
adding stabilizer.

TASK:
After going through the questions and answers related to the experiment, submit a separate report
which should include the analysis of the results of the experiment.

Teacher / Supervisor’s Signature:

93
94

You might also like