In: Electrical Engineering
Project Assignment
Construct the Y_bus matrix of a given power network by computer programming, preferably MATLAB. Note that the necessary data are available in the IEEE common data format; and as the working data, you can use the IEEE 14-bus system data.
Due Date: December 26, 2019.
IEEE-Format Data for 14-Bus System
08/19/93 UW ARCHIVE 100.0 1962 W IEEE 14 Bus Test Case BUS DATA FOLLOWS 14 ITEMS 1 Bus 1 HV 1 1 3 1.060 0.0 0.0 0.0 232.4 -16.9 0.0 1.060 0.0 0.0 0.0 0.0 0 2 Bus 2 HV 1 1 2 1.045 -4.98 21.7 12.7 40.0 42.4 0.0 1.045 50.0 -40.0 0.0 0.0 0 3 Bus 3 HV 1 1 2 1.010 -12.72 94.2 19.0 0.0 23.4 0.0 1.010 40.0 0.0 0.0 0.0 0 4 Bus 4 HV 1 1 0 1.019 -10.33 47.8 -3.9 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 5 Bus 5 HV 1 1 0 1.020 -8.78 7.6 1.6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 6 Bus 6 LV 1 1 2 1.070 -14.22 11.2 7.5 0.0 12.2 0.0 1.070 24.0 -6.0 0.0 0.0 0 7 Bus 7 ZV 1 1 0 1.062 -13.37 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 8 Bus 8 TV 1 1 2 1.090 -13.36 0.0 0.0 0.0 17.4 0.0 1.090 24.0 -6.0 0.0 0.0 0 9 Bus 9 LV 1 1 0 1.056 -14.94 29.5 16.6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.19 0 10 Bus 10 LV 1 1 0 1.051 -15.10 9.0 5.8 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 11 Bus 11 LV 1 1 0 1.057 -14.79 3.5 1.8 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 12 Bus 12 LV 1 1 0 1.055 -15.07 6.1 1.6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 13 Bus 13 LV 1 1 0 1.050 -15.16 13.5 5.8 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 14 Bus 14 LV 1 1 0 1.036 -16.04 14.9 5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 -999 BRANCH DATA FOLLOWS 20 ITEMS 1 2 1 1 1 0 0.01938 0.05917 0.0528 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1 5 1 1 1 0 0.05403 0.22304 0.0492 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2 3 1 1 1 0 0.04699 0.19797 0.0438 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2 4 1 1 1 0 0.05811 0.17632 0.0340 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2 5 1 1 1 0 0.05695 0.17388 0.0346 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3 4 1 1 1 0 0.06701 0.17103 0.0128 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4 5 1 1 1 0 0.01335 0.04211 0.0 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4 7 1 1 1 0 0.0 0.20912 0.0 0 0 0 0 0 0.978 0.0 0.0 0.0 0.0 0.0 0.0 4 9 1 1 1 0 0.0 0.55618 0.0 0 0 0 0 0 0.969 0.0 0.0 0.0 0.0 0.0 0.0 5 6 1 1 1 0 0.0 0.25202 0.0 0 0 0 0 0 0.932 0.0 0.0 0.0 0.0 0.0 0.0 6 11 1 1 1 0 0.09498 0.19890 0.0 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6 12 1 1 1 0 0.12291 0.25581 0.0 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6 13 1 1 1 0 0.06615 0.13027 0.0 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 7 8 1 1 1 0 0.0 0.17615 0.0 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 7 9 1 1 1 0 0.0 0.11001 0.0 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 9 10 1 1 1 0 0.03181 0.08450 0.0 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 9 14 1 1 1 0 0.12711 0.27038 0.0 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 10 11 1 1 1 0 0.08205 0.19207 0.0 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 12 13 1 1 1 0 0.22092 0.19988 0.0 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 13 14 1 1 1 0 0.17093 0.34802 0.0 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -999 LOSS ZONES FOLLOWS 1 ITEMS 1 IEEE 14 BUS -99 INTERCHANGE DATA FOLLOWS 1 ITEMS 1 2 Bus 2 HV 0.0 999.99 IEEE14 IEEE 14 Bus Test Case -9 TIE LINES FOLLOWS 0 ITEMS -999 END OF DATA
IEEE Common Data Format
Partial Description of the IEEE Common Data Format for the Exchange of Solved Load Flow Data The complete description can be found in the paper "Common Data Format for the Exchange of Solved Load Flow Data", Working Group on a Common Format for the Exchange of Solved Load Flow Data, _IEEE Transactions on Power Apparatus and Systems_, Vol. PAS-92, No. 6, November/December 1973, pp. 1916-1925. The data file has lines of up to 128 characters. The lines are grouped into sections with section headers. Data items are entered in specific columns. No blank items are allowed, enter zeros instead. Floating point items should have explicit decimal point. No implicit decimal points are used. Data type codes: A - Alphanumeric (no special characters) I - Integer F - Floating point * - Mandatory item Title Data ========== First card in file. Columns 2- 9 Date, in format DD/MM/YY with leading zeros. If no date provided, use 0b/0b/0b where b is blank. Columns 11-30 Originator's name (A) Columns 32-37 MVA Base (F*) Columns 39-42 Year (I) Column 44 Season (S - Summer, W - Winter) Column 46-73 Case identification (A) Bus Data * ========== Section start card *: --------------------- Columns 1-16 BUS DATA FOLLOWS (not clear that any more than BUS in 1-3 is significant) * Columns ?- ? NNNNN ITEMS (column not clear, I would not count on this) Bus data cards *: ----------------- Columns 1- 4 Bus number (I) * Columns 7-17 Name (A) (left justify) * Columns 19-20 Load flow area number (I) Don't use zero! * Columns 21-23 Loss zone number (I) Columns 25-26 Type (I) * 0 - Unregulated (load, PQ) 1 - Hold MVAR generation within voltage limits, (PQ) 2 - Hold voltage within VAR limits (gen, PV) 3 - Hold voltage and angle (swing, V-Theta) (must always have one) Columns 28-33 Final voltage, p.u. (F) * Columns 34-40 Final angle, degrees (F) * Columns 41-49 Load MW (F) * Columns 50-59 Load MVAR (F) * Columns 60-67 Generation MW (F) * Columns 68-75 Generation MVAR (F) * Columns 77-83 Base KV (F) Columns 85-90 Desired volts (pu) (F) (This is desired remote voltage if this bus is controlling another bus. Columns 91-98 Maximum MVAR or voltage limit (F) Columns 99-106 Minimum MVAR or voltage limit (F) Columns 107-114 Shunt conductance G (per unit) (F) * Columns 115-122 Shunt susceptance B (per unit) (F) * Columns 124-127 Remote controlled bus number Section end card: ----------------- Columns 1- 4 -999 Branch Data * ============= Section start card *: --------------------- Columns 1-16 BRANCH DATA FOLLOWS (not clear that any more than BRANCH is significant) * Columns 40?- ? NNNNN ITEMS (column not clear, I would not count on this) Branch data cards *: -------------------- Columns 1- 4 Tap bus number (I) * For transformers or phase shifters, the side of the model the non-unity tap is on Columns 6- 9 Z bus number (I) * For transformers and phase shifters, the side of the model the device impedance is on. Columns 11-12 Load flow area (I) Columns 13-14 Loss zone (I) Column 17 Circuit (I) * (Use 1 for single lines) Column 19 Type (I) * 0 - Transmission line 1 - Fixed tap 2 - Variable tap for voltage control (TCUL, LTC) 3 - Variable tap (turns ratio) for MVAR control 4 - Variable phase angle for MW control (phase shifter) Columns 20-29 Branch resistance R, per unit (F) * Columns 30-40 Branch reactance X, per unit (F) * No zero impedance lines Columns 41-50 Line charging B, per unit (F) * (total line charging, +B) Columns 51-55 Line MVA rating No 1 (I) Left justify! Columns 57-61 Line MVA rating No 2 (I) Left justify! Columns 63-67 Line MVA rating No 3 (I) Left justify! Columns 69-72 Control bus number Column 74 Side (I) 0 - Controlled bus is one of the terminals 1 - Controlled bus is near the tap side 2 - Controlled bus is near the impedance side (Z bus) Columns 77-82 Transformer final turns ratio (F) Columns 84-90 Transformer (phase shifter) final angle (F) Columns 91-97 Minimum tap or phase shift (F) Columns 98-104 Maximum tap or phase shift (F) Columns 106-111 Step size (F) Columns 113-119 Minimum voltage, MVAR or MW limit (F) Columns 120-126 Maximum voltage, MVAR or MW limit (F) Section end card: ----------------- Columns 1- 4 -999 Loss Zone Data ============== Section start card ------------------ Columns 1-16 LOSS ZONES FOLLOWS (not clear that any more than LOSS is significant) Columns 40?- ? NNNNN ITEMS (column not clear, I would not count on this) Loss Zone Cards: ---------------- Columns 1- 3 Loss zone number (I) Columns 5-16 Loss zone name (A) Section end card: ----------------- Columns 1- 3 -99 Interchange Data * ================== Section start card ------------------ Columns 1-16 INTERCHANGE DATA FOLLOWS (not clear that any more than first word is significant). Columns 40?- ? NNNNN ITEMS (column not clear, I would not count on this) Interchange Data Cards *: ------------------------- Columns 1- 2 Area number (I) no zeros! * Columns 4- 7 Interchange slack bus number (I) * Columns 9-20 Alternate swing bus name (A) Columns 21-28 Area interchange export, MW (F) (+ = out) * Columns 30-35 Area interchange tolerance, MW (F) * Columns 38-43 Area code (abbreviated name) (A) * Columns 46-75 Area name (A) Section end card: ----------------- Columns 1- 2 -9 Tie Line Data ============= Section start card ------------------ Columns 1-16 TIE LINES FOLLOW (not clear that any more than TIE is significant) Columns 40?- ? NNNNN ITEMS (column not clear, I would not count on this) Tie Line Cards: --------------- Columns 1- 4 Metered bus number (I) Columns 7-8 Metered area number (I) Columns 11-14 Non-metered bus number (I) Columns 17-18 Non-metered area number (I) Column 21 Circuit number Section end card: ----------------- Columns 1- 3 -999
solution::
Since the line and bus data given here are very big, I am making them compact here. You can easily get the information relating it to the above data ==>
MATLAB Code ==>
Data file code (Data is saved as matrices in 'data14.m' file ==>
linedata=[1 1 2 .01938 .05917 .0264 1;
2 2 3 .04699 .19797 .0219 1;
3 2 4 .05811 .17632 .0187 1;
4 1 5 .05403 .22304 .0246 1;
5 2 5 .05695 .17388 .0170 1;
6 3 4 .06701 .17103 .0173 1;
7 4 5 .01335 .04211 .0064 1;
8 5 6 0 .25202 0 .932;
9 4 7 0 .20912 0 .978;
10 7 8 0 .17615 0 1;
11 4 9 0 .55618 0 .969;
12 7 9 0 .11001 0 1;
13 9 10 .03181 .08450 0 1;
14 6 11 .09498 .19890 0 1;
15 6 12 .12291 .25581 0 1;
16 6 13 .06615 .13027 0 1;
17 9 14 .12711 .27038 0 1;
18 10 11 .08205 .19207 0 1;
19 12 13 .22092 .19988 0 1;
20 13 14 .17093 .34802 0 1];
busdata=[1 1 1.06 0 0 0 0 0 0 0;
2 3 1.045 .217 .127 .40 0 -.4 .5 0;
3 3 1.010 .942 .190 0 0 -.0 .4 0;
4 2 1 .478 -.039 0 0 0 0 0;
5 2 1 .076 .016 0 0 0 0 0;
6 3 1.07 .112 .075 0 0 -.06 .24 0;
7 2 1 0 0 0 0 0 0 0;
8 3 1.09 0 0 0 0 -.06 .24 0;
9 2 1 .295 .166 0 0 0 0 .19;
10 2 1 .09 .058 0 0 0 0 0;
11 2 1 .035 .018 0 0 0 0 0;
12 2 1 .061 .016 0 0 0 0 0;
13 2 1 .135 .058 0 0 0 0 0;
14 2 1 .149 .05 0 0 0 0 0];
Then, in the same folder, create the main code file ==>
clc
clear all
data14 %% loading the data
[busno,buscol]=size(busdata);
[lineno,linecol]=size(linedata);
%Form YBUS :
ybus(busno,busno)=0;
for(i=1:lineno)
bus1=linedata(i,2);
bus2=linedata(i,3);
z=linedata(i,4)+j*linedata(i,5);
ysh=linedata(i,6);
ts=linedata(i,7);
ts2=ts*ts;
y=1/z;
ybus(bus1,bus1)=ybus(bus1,bus1)+j*ysh+(1/ts2)*y;
ybus(bus2,bus2)=ybus(bus2,bus2)+j*ysh+y;
ybus(bus1,bus2)=ybus(bus1,bus2)-(1/ts)*y;
ybus(bus2,bus1)=ybus(bus1,bus2);
end
%Add Shunt capacitance :
for(i=1:busno)
ybus(i,i)=ybus(i,i)+j*busdata(i,10);
end
RESULTS ==>
>> ybus
ybus =
Columns 1 through 4
6.0250 -19.4471i -4.9991 +15.2631i 0.0000 + 0.0000i 0.0000 +
0.0000i
-4.9991 +15.2631i 9.5213 -30.2707i -1.1350 + 4.7819i -1.6860 +
5.1158i
0.0000 + 0.0000i -1.1350 + 4.7819i 3.1210 - 9.8115i -1.9860 +
5.0688i
0.0000 + 0.0000i -1.6860 + 5.1158i -1.9860 + 5.0688i 10.5130
-38.6352i
-1.0259 + 4.2350i -1.7011 + 5.1939i 0.0000 + 0.0000i -6.8410
+21.5786i
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 +
4.8895i
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 +
1.8555i
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
Columns 5 through 8
-1.0259 + 4.2350i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 +
0.0000i
-1.7011 + 5.1939i 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
-6.8410 +21.5786i 0.0000 + 0.0000i 0.0000 + 4.8895i 0.0000 +
0.0000i
9.5680 -35.5275i 0.0000 + 4.2574i 0.0000 + 0.0000i 0.0000 +
0.0000i
0.0000 + 4.2574i 6.5799 -17.3407i 0.0000 + 0.0000i 0.0000 +
0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 -19.5490i 0.0000 +
5.6770i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 5.6770i 0.0000 -
5.6770i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 9.0901i 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.9550 + 4.0941i 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 -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 9 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 + 1.8555i 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.9550 + 4.0941i -1.5260 +
3.1760i
0.0000 + 9.0901i 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 -24.0925i -3.9020 +10.3654i 0.0000 + 0.0000i 0.0000 +
0.0000i
-3.9020 +10.3654i 5.7829 -14.7683i -1.8809 + 4.4029i 0.0000 +
0.0000i
0.0000 + 0.0000i -1.8809 + 4.4029i 3.8359 - 8.4970i 0.0000 +
0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 4.0150 -
5.4279i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -2.4890 +
2.2520i
-1.4240 + 3.0291i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 +
0.0000i
Columns 13 through 14
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 -1.4240 + 3.0291i
0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i
-2.4890 + 2.2520i 0.0000 + 0.0000i
6.7249 -10.6697i -1.1370 + 2.3150i
-1.1370 + 2.3150i 2.5610 - 5.3440i
Please note the fact that ybus is a 14*14 matix.
NOTE - Hope it helps. Thanks...If you need to discuss anything, please let me know in the comments..please give me like