-
Notifications
You must be signed in to change notification settings - Fork 1
/
case123_R.m
304 lines (290 loc) · 18.5 KB
/
case123_R.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
function mpc = case123_R
%CASE9 Power flow data for 8 bus distribution network
% Please see CASEFORMAT for details on the case file format.
%
% LYZ @ Apr 9th, 2015
%% MATPOWER Case Format : Version 2
mpc.version = '2';
%%----- Power Flow Data -----%%
%% system MVA base
mpc.baseMVA = 100; %%% xxx
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 3 0.0 0.0 0 0 1 1.00 0.0 1.1 1 1.1 0.9;
2 1 0.0 0.0 0 0 1 1.0436 -0.02 1.1 1 1.1 0.9;
3 1 0.4 0.2 0 0 1 1.0311 -0.66 1.1 1 1.1 0.9;
4 1 0.0 0.0 0 0 1 1.0331 -0.33 1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2 0 0 1 1.0375 -2.69 1.1 1 1.1 0.9;
101 1 0.4 0.2 0 0 1 1.0326 -3.98 1.1 1 1.1 0.9;
102 1 0.2 0.1 0 0 1 1.0258 -2.73 1.1 1 1.1 0.9;
103 1 0.0 0.0 0 0 1 1.0345 -3.82 1.1 1 1.1 0.9;
104 1 0.4 0.2 0 0 1 1.0343 -3.83 1.1 1 1.1 0.9;
105 1 0.4 0.2 0 0 1 1.0346 -3.82 1.1 1 1.1 0.9;
106 1 0.4 0.2 0 0 1 1.0348 -3.82 1.1 1 1.1 0.9;
107 1 0.0 0.0 0 0 1 1.0348 -3.82 1.1 1 1.1 0.9;
108 1 0.0 0.0 0 0 1 1.0345 -3.82 1.1 1 1.1 0.9;
109 1 0.0 0.0 0 0 1 1.0337 -3.86 1.1 1 1.1 0.9;
110 1 0.2 0.1 0 0 1 1.0318 -2.44 1.1 1 1.1 0.9;
111 1 0.4 0.2 0 0 1 1.0301 -2.47 1.1 1 1.1 0.9;
112 1 0.4 0.2 0 0 1 1.0283 -2.51 1.1 1 1.1 0.9;
113 1 0.0 0.0 0 0 1 1.0323 -3.9 1.1 1 1.1 0.9;
114 1 0.4 0.2 0 0 1 1.029 -2.29 1.1 1 1.1 0.9;
115 1 0.4 0.2 0 0 1 1.0275 -2.32 1.1 1 1.1 0.9;
116 1 0.0 0.0 0 0 1 1.0309 -3.97 1.1 1 1.1 0.9;
117 1 0.0 0.0 0 0 1 1.0309 -3.97 1.1 1 1.1 0.9;
118 1 0.4 0.2 0 0 1 1.0267 -4.05 1.1 1 1.1 0.9;
119 1 0.0 0.0 0 0 1 1.0248 -4.09 1.1 1 1.1 0.9;
120 1 0.2 0.1 0 0 1 1.024 -4.1 1.1 1 1.1 0.9;
121 1 0.2 0.1 0 0 1 1.0241 -4.1 1.1 1 1.1 0.9;
122 1 0.4 0.2 0 0 1 1.022 -4.14 1.1 1 1.1 0.9;
123 1 0.2 0.1 0 0 1 1.0216 -4.15 1.1 1 1.1 0.9;
];
% bus Pg Qg Qmax Qmin Vg mBase status Pmax Pmin Pc1 Pc2 Qc1min Qc1max Qc2min Qc2max ramp_agc ramp_10 ramp_30 ramp_q apf
mpc.gen = [
1 30.0 12.0 300 -300 1.0 1 1 250 0 0 0 0 0 0 0 0 0 0 0 0;
];
%% branch data
% fbus tbus r x b rateA rateB rateC tap angle status angmin angmax
mpc.branch = [
1 2 0.000200320512821 0.000471908900394 0.00248496370416 250 250 250 0 0 1 -360 360;
2 3 0.000200320512821 0.000471908900394 0.00248496370416 250 250 250 0 0 1 -360 360;
3 4 0.000363671910021 0.000368678828433 0.00123648996611 250 250 250 0 0 1 -360 360;
4 5 0.000290937528017 0.000294943062747 0.000989191972891 250 250 250 0 0 1 -360 360;
4 6 0.000472773483027 0.000479282476963 0.00160743695595 250 250 250 0 0 1 -360 360;
6 7 0.000363671910021 0.000368678828433 0.00123648996611 250 250 250 0 0 1 -360 360;
3 8 0.000254570337015 0.000258075179903 0.00086554297628 250 250 250 0 0 1 -360 360;
3 9 0.000150240384615 0.000353931675296 0.00186372277812 250 250 250 0 0 1 -360 360;
9 10 0.00010016025641 0.000235954450197 0.00124248185208 250 250 250 0 0 1 -360 360;
10 11 0.000327304719019 0.00033181094559 0.0011128409695 250 250 250 0 0 1 -360 360;
10 12 0.000327304719019 0.00033181094559 0.0011128409695 250 250 250 0 0 1 -360 360;
12 13 0.000618242247036 0.000626754008336 0.00210203294239 250 250 250 0 0 1 -360 360;
13 14 0.000363671910021 0.000368678828433 0.00123648996611 250 250 250 0 0 1 -360 360;
13 15 0.000150240384615 0.000353931675296 0.00186372277812 250 250 250 0 0 1 -360 360;
10 16 0.000150240384615 0.000353931675296 0.00186372277812 250 250 250 0 0 1 -360 360;
10 21 0.000150240384615 0.000353931675296 0.00186372277812 250 250 250 0 0 1 -360 360;
16 17 0.000218203146013 0.00022120729706 0.000741893979668 250 250 250 0 0 1 -360 360;
17 18 0.000145468764008 0.000147471531373 0.000494595986445 250 250 250 0 0 1 -360 360;
18 19 0.000545507865032 0.00055301824265 0.00185473494917 250 250 250 0 0 1 -360 360;
18 20 0.000509140674029 0.000516150359806 0.00173108595256 250 250 250 0 0 1 -360 360;
16 21 0.000421287040033 0.000946406076646 0.00540007642035 250 250 250 0 0 1 -360 360;
21 22 0.000363671910021 0.000368678828433 0.00123648996611 250 250 250 0 0 1 -360 360;
22 23 0.000472773483027 0.000479282476963 0.00160743695595 250 250 250 0 0 1 -360 360;
21 24 0.000153195287285 0.000344147664235 0.00196366415285 250 250 250 0 0 1 -360 360;
16 24 0.000153195287285 0.000344147664235 0.00196366415285 250 250 250 0 0 1 -360 360;
24 25 0.000763711011044 0.00077422553971 0.00259662892884 250 250 250 0 0 1 -360 360;
26 27 0.000800078202046 0.000811093422553 0.00272027792545 250 250 250 0 0 1 -360 360;
24 26 0.000127662739404 0.000286789720196 0.00163638679405 250 250 250 0 0 1 -360 360;
26 28 0.000140429013344 0.000315468692215 0.00180002547345 250 250 250 0 0 1 -360 360;
28 29 0.000102130191523 0.000229431776157 0.00130910943524 250 250 250 0 0 1 -360 360;
29 30 0.000153195287285 0.000344147664235 0.00196366415285 250 250 250 0 0 1 -360 360;
30 31 0.000178727835166 0.000401505608274 0.00229094151166 250 250 250 0 0 1 -360 360;
31 32 0.000102130191523 0.000229431776157 0.00130910943524 250 250 250 0 0 1 -360 360;
28 33 0.000175280448718 0.000412920287845 0.00195941784828 250 250 250 0 0 1 -360 360;
33 34 0.000137720352564 0.000324437369021 0.00153954259508 250 250 250 0 0 1 -360 360;
33 35 0.000327304719019 0.00033181094559 0.0011128409695 250 250 250 0 0 1 -360 360;
35 36 0.000436406292025 0.00044241459412 0.00148378795934 250 250 250 0 0 1 -360 360;
34 37 0.000727343820042 0.000737357656866 0.00247297993223 250 250 250 0 0 1 -360 360;
21 38 0.000189401053049 0.000437120393504 0.00221498683295 250 250 250 0 0 1 -360 360;
38 39 0.000189401053049 0.000437120393504 0.00221498683295 250 250 250 0 0 1 -360 360;
39 40 0.000325520833333 0.000766851963141 0.00363891886109 250 250 250 0 0 1 -360 360;
40 41 0.000436406292025 0.00044241459412 0.00148378795934 250 250 250 0 0 1 -360 360;
40 42 0.000363671910021 0.000368678828433 0.00123648996611 250 250 250 0 0 1 -360 360;
42 43 0.000472773483027 0.000479282476963 0.00160743695595 250 250 250 0 0 1 -360 360;
39 44 0.000125200320513 0.000294943062747 0.0015531023151 250 250 250 0 0 1 -360 360;
44 45 0.000472773483027 0.000479282476963 0.00160743695595 250 250 250 0 0 1 -360 360;
44 46 0.000125200320513 0.000294943062747 0.0015531023151 250 250 250 0 0 1 -360 360;
46 47 0.000727343820042 0.000737357656866 0.00247297993223 250 250 250 0 0 1 -360 360;
46 48 0.00010016025641 0.000235954450197 0.00124248185208 250 250 250 0 0 1 -360 360;
48 49 0.000290937528017 0.000294943062747 0.000989191972891 250 250 250 0 0 1 -360 360;
49 50 0.000436406292025 0.00044241459412 0.00148378795934 250 250 250 0 0 1 -360 360;
48 51 0.000125200320513 0.000294943062747 0.0015531023151 250 250 250 0 0 1 -360 360;
51 52 7.57604212194e-05 0.000174848157401 0.000885994733181 250 250 250 0 0 1 -360 360;
51 53 0.000126267368699 0.000291413595669 0.00147665788864 250 250 250 0 0 1 -360 360;
53 54 0.000126267368699 0.000291413595669 0.00147665788864 250 250 250 0 0 1 -360 360;
54 55 0.000126267368699 0.000291413595669 0.00147665788864 250 250 250 0 0 1 -360 360;
55 56 0.000200320512821 0.000471908900394 0.00248496370416 250 250 250 0 0 1 -360 360;
16 57 0.000200320512821 0.000471908900394 0.00248496370416 250 250 250 0 0 1 -360 360;
57 58 0.000200320512821 0.000471908900394 0.00248496370416 250 250 250 0 0 1 -360 360;
58 59 0.00010016025641 0.000235954450197 0.00124248185208 250 250 250 0 0 1 -360 360;
59 60 6.26001602564e-05 0.000147471531373 0.000776551157551 250 250 250 0 0 1 -360 360;
60 61 0.000137720352564 0.000324437369021 0.00170841254661 250 250 250 0 0 1 -360 360;
61 62 0.000137720352564 0.000324437369021 0.00170841254661 250 250 250 0 0 1 -360 360;
60 63 0.000176774316179 0.000407979033937 0.00206732104409 250 250 250 0 0 1 -360 360;
63 64 0.000363671910021 0.000368678828433 0.00123648996611 250 250 250 0 0 1 -360 360;
64 65 0.000363671910021 0.000368678828433 0.00123648996611 250 250 250 0 0 1 -360 360;
63 66 0.000378802106097 0.000874240787007 0.00442997366591 250 250 250 0 0 1 -360 360;
66 67 0.000416121432404 0.000205776138675 0.0183926822251 250 250 250 0 0 1 -360 360;
67 68 0.000291285002683 0.000144043297073 0.0128748775576 250 250 250 0 0 1 -360 360;
68 69 0.000582570005365 0.000288086594145 0.0257497551152 250 250 250 0 0 1 -360 360;
69 70 0.000707406435086 0.000349819435748 0.0312675597827 250 250 250 0 0 1 -360 360;
70 71 0.000540957862125 0.000267508980278 0.0239104868927 250 250 250 0 0 1 -360 360;
66 72 0.000175280448718 0.000412920287845 0.00217434324114 250 250 250 0 0 1 -360 360;
72 73 0.000175280448718 0.000412920287845 0.00217434324114 250 250 250 0 0 1 -360 360;
73 74 0.000290937528017 0.000294943062747 0.000989191972891 250 250 250 0 0 1 -360 360;
74 75 0.000400039101023 0.000405546711277 0.00136013896272 250 250 250 0 0 1 -360 360;
75 76 0.000472773483027 0.000479282476963 0.00160743695595 250 250 250 0 0 1 -360 360;
76 77 0.000400039101023 0.000405546711277 0.00136013896272 250 250 250 0 0 1 -360 360;
73 78 0.000138894105569 0.000320554955236 0.0016243236775 250 250 250 0 0 1 -360 360;
78 79 0.000400039101023 0.000405546711277 0.00136013896272 250 250 250 0 0 1 -360 360;
79 80 0.000509140674029 0.000516150359806 0.00173108595256 250 250 250 0 0 1 -360 360;
80 81 0.000581875056034 0.000589886125493 0.00197838394578 250 250 250 0 0 1 -360 360;
78 82 0.000101013894959 0.000233130876535 0.00118132631091 250 250 250 0 0 1 -360 360;
82 83 0.000200320512821 0.000471908900394 0.00248496370416 250 250 250 0 0 1 -360 360;
83 84 5.00801282051e-05 0.000117977225099 0.000621240926041 250 250 250 0 0 1 -360 360;
84 85 0.000112680288462 0.000265448756472 0.00139779208359 250 250 250 0 0 1 -360 360;
84 86 0.000237880608974 0.000560391819218 0.0029508943987 250 250 250 0 0 1 -360 360;
86 87 0.000237880608974 0.000560391819218 0.0029508943987 250 250 250 0 0 1 -360 360;
87 88 0.000125200320513 0.000294943062747 0.0015531023151 250 250 250 0 0 1 -360 360;
88 89 0.000125200320513 0.000294943062747 0.0015531023151 250 250 250 0 0 1 -360 360;
87 90 0.000981914157057 0.00099543283677 0.00333852290851 250 250 250 0 0 1 -360 360;
90 91 0.00069097662904 0.000700489774023 0.00234933093562 250 250 250 0 0 1 -360 360;
82 92 0.000353548632357 0.000815958067874 0.00413464208818 250 250 250 0 0 1 -360 360;
92 93 0.000225360576923 0.000530897512944 0.00279558416718 250 250 250 0 0 1 -360 360;
93 94 0.000137720352564 0.000324437369021 0.00170841254661 250 250 250 0 0 1 -360 360;
94 95 0.000112680288462 0.000265448756472 0.00139779208359 250 250 250 0 0 1 -360 360;
95 96 0.000112680288462 0.000265448756472 0.00139779208359 250 250 250 0 0 1 -360 360;
96 97 0.000150240384615 0.000353931675296 0.00186372277812 250 250 250 0 0 1 -360 360;
93 98 0.000254570337015 0.000258075179903 0.00086554297628 250 250 250 0 0 1 -360 360;
94 99 0.000327304719019 0.00033181094559 0.0011128409695 250 250 250 0 0 1 -360 360;
95 100 0.000436406292025 0.00044241459412 0.00148378795934 250 250 250 0 0 1 -360 360;
96 101 0.000400039101023 0.000405546711277 0.00136013896272 250 250 250 0 0 1 -360 360;
97 102 0.000290937528017 0.000294943062747 0.000989191972891 250 250 250 0 0 1 -360 360;
73 103 0.000126267368699 0.000291413595669 0.00147665788864 250 250 250 0 0 1 -360 360;
103 104 0.000138894105569 0.000320554955236 0.0016243236775 250 250 250 0 0 1 -360 360;
104 105 0.000277788211138 0.000641109910472 0.003248647355 250 250 250 0 0 1 -360 360;
105 106 0.000151520842439 0.000349696314803 0.00177198946636 250 250 250 0 0 1 -360 360;
106 107 0.000404055579837 0.000932523506141 0.00472530524363 250 250 250 0 0 1 -360 360;
103 108 0.000126267368699 0.000291413595669 0.00147665788864 250 250 250 0 0 1 -360 360;
108 109 0.000126267368699 0.000291413595669 0.00147665788864 250 250 250 0 0 1 -360 360;
109 110 0.000327304719019 0.00033181094559 0.0011128409695 250 250 250 0 0 1 -360 360;
110 111 0.000472773483027 0.000479282476963 0.00160743695595 250 250 250 0 0 1 -360 360;
111 112 0.00101828134806 0.00103230071961 0.00346217190512 250 250 250 0 0 1 -360 360;
109 113 0.000138894105569 0.000320554955236 0.0016243236775 250 250 250 0 0 1 -360 360;
113 114 0.000327304719019 0.00033181094559 0.0011128409695 250 250 250 0 0 1 -360 360;
114 115 0.000836445393048 0.000847961305396 0.00284392692206 250 250 250 0 0 1 -360 360;
113 116 0.000164147579309 0.00037883767437 0.00191965525523 250 250 250 0 0 1 -360 360;
116 117 0.000505069474796 0.00116565438268 0.00590663155454 250 250 250 0 0 1 -360 360;
116 118 0.000654609438038 0.00066362189118 0.002225681939 250 250 250 0 0 1 -360 360;
118 119 0.000436406292025 0.00044241459412 0.00148378795934 250 250 250 0 0 1 -360 360;
119 120 0.000836445393048 0.000847961305396 0.00284392692206 250 250 250 0 0 1 -360 360;
119 121 0.000181835955011 0.000184339414217 0.000618244983057 250 250 250 0 0 1 -360 360;
121 122 0.000763711011044 0.00077422553971 0.00259662892884 250 250 250 0 0 1 -360 360;
122 123 0.000472773483027 0.000479282476963 0.00160743695595 250 250 250 0 0 1 -360 360;
% 1 3 0.000472773483027 0.000479282476963 0.00160743695595 250 250 250 0 0 0 -360 360;
% 1 4 0.000472773483027 0.000479282476963 0.00160743695595 250 250 250 0 0 0 -360 360;
% 2 5 0.000472773483027 0.000479282476963 0.00160743695595 250 250 250 0 0 0 -360 360;
% 2 6 0.000472773483027 0.000479282476963 0.00160743695595 250 250 250 0 0 0 -360 360;
% 3 11 0.000472773483027 0.000479282476963 0.00160743695595 250 250 250 0 0 0 -360 360;
% 3 12 0.000472773483027 0.000479282476963 0.00160743695595 250 250 250 0 0 0 -360 360;
% 4 15 0.000472773483027 0.000479282476963 0.00160743695595 250 250 250 0 0 0 -360 360;
% 4 16 0.000472773483027 0.000479282476963 0.00160743695595 250 250 250 0 0 0 -360 360;
];
%% convert branch impedances from Ohms to p.u.
[PQ, PV, REF, NONE, BUS_I, BUS_TYPE, PD, QD, GS, BS, BUS_AREA, VM, ...
VA, BASE_KV, ZONE, VMAX, VMIN, LAM_P, LAM_Q, MU_VMAX, MU_VMIN] = idx_bus;
[F_BUS, T_BUS, BR_R, BR_X, BR_B, RATE_A, RATE_B, RATE_C, ...
TAP, SHIFT, BR_STATUS, PF, QF, PT, QT, MU_SF, MU_ST, ...
ANGMIN, ANGMAX, MU_ANGMIN, MU_ANGMAX] = idx_brch;
%Vbase = mpc.bus(1, BASE_KV) * 1e3; %% in Volts
%Sbase = mpc.baseMVA * 1e6; %% in VA
mpc.branch(:, [BR_R BR_X]) = mpc.branch(:, [BR_R BR_X])*100;
mpc.branch(:, BR_B) = 0;
%% convert loads from kW to MW
mpc.bus(:, [PD, QD]) = mpc.bus(:, [PD, QD]);
mpc.gen(:,[2,3,4,5]) = mpc.gen(:,[2,3,4,5]);