Assignment - Power System
Assignment - Power System
Energy
LAB PART 3
ID : e21090712
Group: GEE EE
( )
1 2 3 4 5 6 7
1. A= 9 7 5 3 1 −1 −3
4 8 16 32 64 128 254
( )
1 2 3 4 5 6 7
1. We have matrix A= 9 7 5 3 1 −1 −3
4 8 16 32 64 128 254
2. Use the barcycle function to obtain a plot of the daily load curve. Using the given data
compute the average load and the daily load factor.
POWER SYSTEM LAB 2
1. The annual load of a substation is given in the following table. During each month, the
power is assumed constant at an average value. Using MATLAB and the barcycle function,
obtain a plot of the annual load curve. Write the necessary statements to find the average
load and the annual load factor.
2. Two voltage sources V1120 4 V and V2 1004 V are connected by a short line of
impedance Z = 4 + j8 Ω as shown in Figure below. Determine the real and reactive power
supplied or received by each source and the power loss in the line.
Write a MATlAB program for the system such that the phase angle of source 1 is changed
from its initial value by ±28° in steps of 4°. Voltage magnitudes of the two sources and
the voltage phase angle of source 2 is to be kept constant. Compute the complex power
for each source and the line loss. Tabulate the real power and plot P1, P2, and PL versus
voltage phase angle δ .
Solution:
1. Using MATLAB and the barcycle function, obtain a plot of the annual load curve. Write
the necessary statements to find the average load and the annual load factor.
CODING
data = [ 0 1 9
1 2 6
2 3 5
3 4 7
4 5 8
5 6 5
6 7 6
7 8 3
8 9 7
9 10 6
10 11 5
11 12 12];
PLOT
2. Determine the real and reactive power supplied or received by each source and the power
loss in the line.
Write a MATlAB program for the system such that the phase angle of source 1 is
changed from its initial value by ±28° in steps of 4°.
CODING
E1=120;
a1=-4;
E2=100;
a2=4;
R=4;
X=8;
Z= R + j*X; % line impedance
a1 = (-30+a1:5:30+a1)'; % change a1 by +/- 30 deg., col. array
a1r = a1*pi/180; % convert degree to radian
k=length(a1);
a2=ones(k,1)*a2; % create col. array of same length for a2
a2r = a2*pi/180; % convert degree to radian
V1=E1.*cos(a1r) + j*E1.*sin(a1r);
V2=E2.*cos(a2r) + j*E2.*sin(a2r);
I12 = (V1 - V2)./Z; I21=-I12;
S1= V1.*conj(I12); P1 = real(S1); Q1 = imag(S1);
S2= V2.*conj(I21); P2 = real(S2); Q2 = imag(S2);
SL= S1+S2; PL = real(SL); QL = imag(SL);
Result1=[a1, P1, P2, PL];
disp(' ')
disp(' Delta 1 P_1 P_2 P_L ')
disp(Result1)
plot(a1, P1, a1, P2, a1, PL), grid
text(-26, -550, 'P_1'), text(-26, 600,'P_2'), text(-26, 115,
'P_L')
xlabel('Source #1 Voltage Phase Angle, \delta_1'), ylabel('P,
Watts')
COMMENT WINDOW:
Power System Lab3
1 2 0.01008 0.0504 ;
1 3 0.00744 0.0372 ;
2 4 0.00744 0.0372 ;
3 4 0.01272 0.0636 ;
1
Y 12= =90.9091− j 454.545
0.01008+ j0.0504
1
Y 13= =134.4086− j672.043
0.00744+ j 0.0372
1
Y 24= =134.4086− j 672.043
0.00744 + j 0.0372
1
Y 34= =73.9641− j 369.820
0.001272+ j0.0636
2. Build your algorithm in matlab program to find bus admittance matrix
3. From question (2) Find Ybus matrix
4. From the diagram shown below find voltage of bus 1, 2 and 3B.
POWER SYSTEM LAB 3
1. Draw flowchart of Guassidel iteration method .
2. Find a root of this equation x 2−6 x +2=0 by Guassidel iteration method and initial value
(0)
x =1 , ε <0.003
3. Find a root of equation above by the same method in your Matlab algorithm
4. Power flow by Guassidel method
• Collect the system data (bus data, gen data, branch data)
• Form Ybus matrix
• Identify the which one is (slack bus, PV buses, PQ buses)
• Assume bus voltages: for PQ buses (magnitude + angle), for PV buses (angle) for Slack
both pre-specified
• Form the voltage equation of PV buses and PQ buses
• Slack bus nothing to deal with
• For PV buses: find Q and new voltage angle (fixed magnitude) from the voltage
equation
• For PQ buses: find new voltage from the voltage equation
• Check the voltage convergence of all buses
• (If converge) program is terminated
• (If not converge) go to 6. again, and repeat
5. Using the Gauss-Seidel method, determine the values of the voltage at the load buses 2 and 3
6. Obtain the power flow solution of system below by using Guassidel method
SOLUTION
Start
Set i=1
Set x(i)=1
Set error_x(i)=0.003
While error_x(i)>=0.003
Set i = i + 1
End
x (3 )=5. 63
x ( 4 )=5.64516129
x (5 )=¿ 5.64571428
error_x(i+1) = abs(x(i+1)-x(i));
i=i+1
end
disp(' x error_x');
disp([x',error_x'])
COMMENT WINDOW:
x error_x
4 3
5.5 1.5
5.63636363636364 0.136363636363637
5.64516129032258 0.00879765395894339
5.64571428571429 0.000552995391705835
5. Using the Gauss-Seidel method, determine the values of the voltage at the load buses 2 and 3.
CODING:
clear;
clc;
Z_12 = 0.02 + j*0.04;
Z_13 = 0.01 + j*0.03;
Z_23 = 0.0125 + j*0.025;
Z_33 = Z_13 + Z_23;
%%%%%%%%%%%
% y12=10-j*20;
% y13=10-j*30;
% y23=16-j*32;
% y33=y13+y23;
% V1=1.05+j*0;
y12=1/(Z_12);
y13=1/(Z_13);
y23=1/(Z_23);
y33=y13+y23;
V1=1.05+j*0;
%format long
iter =0;
S2=-4.0-j*2.5;
P3 = 2;
V2=1.03+j*0;
Vm3=1.04;
V3=1.04+j*0;
for I=1:10;
iter=iter+1
E2 = V2;
E3=V3;
V2 = (conj(S2)/conj(V2)+y12*V1+y23*V3)/(y12+y23)
DV2 = V2-E2;
Q3 = -imag(conj(V3)*(y33*V3-y13*V1-y23*V2));
S3 = P3 +j*Q3;
Vc3 = (conj(S3)/conj(V3)+y13*V1+y23*V2)/(y13+y23);
Vi3 = imag(Vc3);
Vr3= sqrt(Vm3^2 - Vi3^2);
V3 = Vr3 + j*Vi3
DV3=V3-E3;
end
COMMAND WINDOW:
iter = 1
V2 = 0.9766 - 0.0411i V3 =1.0400 - 0.0042i
iter =2
V2 =0.9713 - 0.0428i V3 =1.0400 - 0.0068i
iter =3
V2 =0.9708 - 0.0445i V3 =1.0400 - 0.0081i
iter =4
V2 =0.9707 - 0.0452i V3 =1.0400 - 0.0087i
iter =5
V2 =0.9706 - 0.0455i V3 =1.0400 - 0.0089i
iter =6
V2 =0.9706 - 0.0456i V3 =1.0400 - 0.0090i
iter =7
V2 =0.9706 - 0.0457i V3 =1.0400 - 0.0090i
iter =8
V2 =0.9706 - 0.0457i V3 =1.0400 - 0.0090i
iter =9
V2 =0.9706 - 0.0457i V3 =1.0400 - 0.0090i
iter = 10
V2 = 0.9706 - 0.0457i V3 =1.0400 - 0.0091i
6. Obtain the power flow solution of system below by using Guassidel method.
y12=10-j*20;
y13=10-j*30;
y23=16-j*32;
V1=1.05+j*0;
iter =0;
S2=-2.566-j*1.102;
S3=-1.386-j*.452;
V2=1+j*0;
V3=1+j*0;
for I=1:10;
iter=iter+1;
V2 = (conj(S2)/conj(V2)+y12*V1+y23*V3)/(y12+y23);
V3 = (conj(S3)/conj(V3)+y13*V1+y23*V2)/(y13+y23);
disp(' ier V2 V3');
disp([iter, V2, V3])
end
COMMENT WINDOW:
Iter =1
V2 =0.9825 - 0.0310i V3 =1.0011 - 0.0353i
Iter =2
V2 =0.9816 - 0.0520i V3 =1.0008 - 0.0459i
Iter =3
V2 =0.9808 - 0.0578i V3 =1.0004 - 0.0488i
Iter =4
V2 =0.9803 - 0.0594i V3 =1.0002 - 0.0497i
Iter =5
V2 =0.9801 - 0.0598i V3 =1.0001 - 0.0499i
Iter =6
V2 =0.9801 - 0.0599i V3 =1.0000 - 0.0500i
Iter =7
V2 =0.9800 - 0.0600i V3 =1.0000 - 0.0500i
Iter =8
V2 =0.9800 - 0.0600i V3 =1.0000 - 0.0500i
Iter =9
V2 =0.9800 - 0.0600i V3 =1.0000 - 0.0500i
Iter =10
V2 =0.9800 - 0.0600i V3 =1.0000 - 0.0500i