I4_GEE_A1_CHUN_Samnang_e20211295_Lab05_power_system 2
I4_GEE_A1_CHUN_Samnang_e20211295_Lab05_power_system 2
I4_GEE_A1_CHUN_Samnang_e20211295_Lab05_power_system 2
1
Academic Year 2024-2025
Power system lab 5: Power flow Part1
A.
Breach = [ fbus tbus r x ]
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.Find bus admittance matrix by hand calculation.
Z12 = 0.01008 + j0.0504
Z13 = 0.00744 + j0.0372
Z24 = 0.00744 + j0.0372
Z34 = 0.01272 + j0.0636
Then,
1 1
𝑌12 = 𝑌21 = −𝑦12 = = = −3.8156 + 𝑗19.0781
𝑍 0.01008 + j0.0504
1 1
𝑌13 = 𝑌31 = −𝑦13 = = = −5.1696 + 𝑗25.8478
𝑍 0.00744 + j0.0372
1 1
𝑌24 = 𝑌24 = −𝑦24 = = = −5.1696 + 𝑗25.8478
𝑍 0.00744 + j0.0372
1 1
𝑌34 = 𝑌43 = −𝑦34 = = = −3.0237 + 𝑗15.1185
𝑍 0.01272 + j0.0636
𝐴𝑛𝑑 𝑌14 = 𝑌41 = −𝑦14 = 0
𝑌23 = 𝑌32 = −𝑦23 = 0
So, we get 𝑌11 = 𝑦12 + 𝑦13 + 𝑦14 = 8.9852 – 𝑗44.9260
𝑌22 = 𝑦21 + 𝑦23 + 𝑦24 = 8.9852 − 𝑗44.9260
𝑌33 = 𝑦31 + 𝑦32 + 𝑦34 = 8.9133 − 𝑗40.9663
𝑌44 = 𝑦41 + 𝑦42 + 𝑦43 = 8.1933 − 𝑗40.9663
Thus
𝑌𝑏𝑢𝑠 =
8.9852 -44.9260i -3.8156 +19.0781i -5.1696 +25.8478i 0.0000 + 0.0000i
-3.8156 +19.0781i 8.9852 -44.9260i 0.0000 + 0.0000i -5.1696 +25.8478i
2
-5.1696 +25.8478i 0.0000 + 0.0000i 8.1933 -40.9663i -3.0237 +15.1185i
0.0000 + 0.0000i -5.1696 +25.8478i -3.0237 +15.1185i 8.1933 -40.9663i
2.Build your algorithm in matlab program to find bus admittance matrix
➢ Code
clc;
close all;
clear;
% Number of buses
numBuses = 4;
➢ Result
Z=
0.0101 + 0.0504i
0.0074 + 0.0372i
3
0.0074 + 0.0372i
0.0127 + 0.0636i
Column 4
0.0000 + 0.0000i
-5.1696 +25.8478i
-3.0237 +15.1185i
8.1933 -40.9663i
clc;
close all;
clear;
% Number of buses
numBuses = 4;
4
% Diagonal elements: sum of admittances connected to each bus
Ybus(1, 1) = Y12 + Y13; % Bus 1 connected to Bus 2 and Bus 3
Ybus(2, 2) = Y12 + Y24; % Bus 2 connected to Bus 1 and Bus 4
Ybus(3, 3) = Y13 + Y34; % Bus 3 connected to Bus 1 and Bus 4
Ybus(4, 4) = Y24 + Y34; % Bus 4 connected to Bus 2 and Bus 3
➢ Result
Bus Impedance Matrix (Zbus):
1.0e+14 *
Columns 1 through 2
Columns 3 through 4
5
4.From the diagram shown below find voltage of bus 1, 2 and 3
Figure 1: diagram
➢ Code
clc;
close all;
clear;
% Define impedances
Z11 = 0.001 + 1j * 0.01;
Z12 = 0.02 + 1j * 0.035;
Z23 = 0.0125 + 1j * 0.025;
Z13 = 0.02 + 1j * 0.025;
% Calculate admittances
Y11 = 1 / Z11 + 1 / Z12 + 1 / Z13;
Y12 = -1 / Z12;
Y21 = Y12; % Symmetric term
Y22 = 1 / Z12 + 1 / Z23;
Y23 = -1 / Z23;
Y32 = Y23; % Symmetric term
Y33 = 1 / Z23 + 1 / Z13;
Y13 = -1 / Z13;
Y31 = Y13; % Symmetric term
6
% Display results
disp('Voltage at bus 1:');
disp(V(1));
disp('Voltage at bus 2:');
disp(V(2));
disp('Voltage at bus 3:');
disp(V(3));
➢ Result
Voltage at bus 1:
1.0500 + 0.0000i
Voltage at bus 2:
1.0500 - 0.0000i
Voltage at bus 3:
1.0500 - 0.0000i
B.
Branch = [ fbus tbus r x ]
1 2 0.01938 0.05917 ;
1 5 0.05403 0.22304 ;
2 3 0.04699 0.19797 ;
2 4 0.05811 0.17632 ;
2 5 0.05695 0.17388 ;
3 4 0.06701 0.17103 ;
4 5 0.01335 0.04211 ;
4 7 0 0.20912 ;
4 9 0 0.55618 ;
5 6 0 0.25202 ;
6 11 0.09498 0.1989 ;
6 12 0.12291 0.25581 ;
6 13 0.06615 0.13027 ;
7 8 0 0.17615 ;
7 9 0 0.11001 ;
9 10 0.03181 0.0845 ;
9 14 0.12711 0.27038 ;
10 11 0.08205 0.19207 ;
12 13 0.22092 0.19988 ;
13 14 0.17093 0.34802 ;
-Find bus admittance matrix Ybus of this system by using your program above.
➢ Code
7
clc;
clear;
close all;
% Number of buses
numBuses = 14;
Z = r + 1j * x; % Impedance
Y = 1 / Z; % Admittance
8
% Add admittance to diagonal of both buses
Ybus(fbus, fbus) = Ybus(fbus, fbus) + Y;
Ybus(tbus, tbus) = Ybus(tbus, tbus) + Y;
➢ Result
Bus Admittance Matrix (Ybus):
Columns 1 through 6
6.0250 -19.4981i -4.9991 +15.2631i 0.0000 + 0.0000i 0.0000 + 0.0000i -1.0259 + 4.2350i 0.0000 + 0.0000i
-4.9991 +15.2631i 9.5213 -30.3547i -1.1350 + 4.7819i -1.6860 + 5.1158i -1.7011 + 5.1939i 0.0000 + 0.0000i
0.0000 + 0.0000i -1.1350 + 4.7819i 3.1210 - 9.8507i -1.9860 + 5.0688i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i -1.6860 + 5.1158i -1.9860 + 5.0688i 10.5130 -38.3431i -6.8410 +21.5786i 0.0000 + 0.0000i
-1.0259 + 4.2350i -1.7011 + 5.1939i 0.0000 + 0.0000i -6.8410 +21.5786i 11.5230 -35.1015i -1.9550 + 4.0941i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -1.9550 + 4.0941i 6.5799 -13.3728i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 6.5799i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -1.5260 + 3.1760i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -3.0989 + 6.1028i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
Columns 7 through 12
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 6.5799i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -1.5260 + 3.1760i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 5.3261 -25.8015i -3.9020 +16.1926i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i -3.9020 +16.1926i 5.7829 -20.5955i -1.8809 + 4.4029i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -1.8809 + 4.4029i 3.4069 - 7.5789i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 2.4890 - 2.2520i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -2.4890 + 2.2520i
0.0000 + 0.0000i 0.0000 + 0.0000i -1.4240 + 3.0291i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
Columns 13 through 14
9
C. The single line diagram of a power system is shown in Figure. The specifications are given below.
• Generator 𝑋𝑃 = 1𝑝𝑢
➢ Transformer 𝑻𝟏
𝑆𝑏𝑛 𝑉𝑏𝑜 2
𝑋𝑇1𝑝𝑢(𝑛𝑒𝑤) = 𝑋𝑝𝑢(𝑜𝑙𝑑) × ×( )
𝑆𝑏𝑜 𝑉𝑏𝑛
100 10 2
𝑋𝑇1𝑝𝑢(𝑛𝑒𝑤) = 0.01 × × ( ) = 0.0066 𝑝𝑢
150 10
𝑍𝑎𝑐𝑡𝑢𝑎𝑙(𝑙𝑖𝑛𝑒)
• Line 𝑍𝑝𝑢(𝑙𝑖𝑛𝑒) =
𝑍𝑏𝑎𝑠𝑒
7.8 + 𝑗7.5
⇔ 𝑍𝑏𝑎𝑠𝑒 = = 0.0590 + 𝑗0.0567
132.25
➢ Transformer 𝑻𝟐
𝑆𝑏𝑛 𝑉𝑏𝑜 2
𝑋𝑇2𝑝𝑢(𝑛𝑒𝑤) = 𝑋𝑝𝑢(𝑜𝑙𝑑) × ×( )
𝑆𝑏𝑜 𝑉𝑏𝑛
22
𝑠𝑖𝑛𝑐𝑒 𝑉𝑏 = 115 × = 21.083 𝐾𝑉
120
∗
𝑏𝑦 𝑆𝑙𝑜𝑎𝑑 = (60 + 𝑗30) × 106 𝑉𝐴
21.083 × 103
𝑍𝑙𝑜𝑎𝑑1 = = 5.9266 − 𝑗2.9633
(60 + 𝑗30) × 106
𝑉𝑏2
𝑍𝑏𝑎𝑠𝑒 = ∗
𝑆𝑏𝑛𝑒𝑤
∗
𝑏𝑦 𝑠𝑖𝑛𝑐𝑒, 𝑉𝑏 = 21.083𝐾𝑉 , 𝑆𝑏𝑛𝑒𝑤 = 100𝑀𝑉𝐴
(0.3833)2
⇔ 𝑍𝑏𝑎𝑠𝑒 = = 0.0015
100
0.0118 − 𝑗0.0059
𝑇ℎ𝑢𝑠 𝑍𝑝𝑢(𝑙𝑜𝑎𝑑2) = = 7.8667 − 𝑗 3.9333
0.0015
➢ Transformer 𝑻𝟑
𝑆𝑏𝑛 𝑉𝑏𝑜 2
𝑋𝑇3𝑝𝑢(𝑛𝑒𝑤) = 𝑋𝑝𝑢(𝑜𝑙𝑑) × ×( )
𝑆𝑏𝑜 𝑉𝑏𝑛
𝑋𝑝𝑢(𝑜𝑙𝑑) = 0.08𝑝𝑢 ; 𝑆𝑏𝑛 = 100𝑀𝑉𝐴 ; 𝑆𝑏𝑜 = 50𝑀𝑉𝐴 ; 𝑉𝑏𝑜 = 22𝐾𝑉 ; 𝑉𝑏𝑛 = 21.083𝐾𝑉
100 22 2
𝑋𝑇2𝑝𝑢(𝑛𝑒𝑤) = 0.08 × ×( ) = 0.1742 𝑝𝑢
50 21.083
11
Figure3 : Impedance diagram
2. Calculate Ybus by using Matlab code and Power World software, and then compare there results.
➢ Code
zdata =[
1 20 0.0066;
2 30.0590 0.0567;
3 40 0.0544;
4 50 0.1742;
];
ybus(zdata)
➢ Result
Z =
0.0000 + 0.0066i
0.0590 + 0.0567i
0.0000 + 0.0544i
0.0000 + 0.1742i
ans =
1.0e+02 *
Columns 1 through 3
12
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
Columns 4 through 5
➢ Result in PowerWorld
Figure 5: the
voltage of all buses in p.u. and kV .
13