Merge pull request #4 from yangliu0101/release

add basic version of EMT functionality
This commit is contained in:
yangliu0101
2023-07-25 16:38:00 -04:00
committed by GitHub
11 changed files with 839 additions and 0 deletions

View File

@@ -5,6 +5,18 @@ Data and Models
~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
Currently PowerSAS.m supports extended PSAT (Matlab) data format. Currently PowerSAS.m supports extended PSAT (Matlab) data format.
In addition, PSS/E data format can be easily converted to the PSAT data format
using the ``psse2mpc`` function by MATPOWER and the ``matpower2psat`` function
by PSAT. A sample code to convert a PSS/E *raw file to the PSAT format is below:
.. code:: matlab
casename = 'ieee14'
[mpc, warnings] = psse2mpc(horzcat(casename,'.raw'),horzcat(casename,'.m'));
check = matpower2psat(horzcat(casename,'.m'), pwd);
Support for other formats and data format conversion features will be Support for other formats and data format conversion features will be
added in future versions. added in future versions.

79
interface/data/d_ieee14.m Normal file
View File

@@ -0,0 +1,79 @@
% 03/16/23 File data originated from Matpower data file
%
Bus.con = [ ...
1 69 1.03 0 1 1;
2 69 1.02 -0.02798 1 1;
3 69 1 -0.0601 1 1;
4 69 0.9986 -0.07472 1 1;
5 69 1.004 -0.06432 1 1;
6 138 0.9987 -0.11 2 2;
7 138 1.007 -0.08429 2 2;
8 69 1.019 -0.02434 2 2;
9 138 1.002 -0.1275 2 2;
10 138 0.9935 -0.1302 2 2;
11 138 0.9925 -0.1229 2 2;
12 138 0.9864 -0.1289 2 2;
13 138 0.984 -0.1338 2 2;
14 138 0.9906 -0.1669 2 2;
];
SW.con = [ ...
1 100 69 1.03 0 1 -0.5 1.1 0.9 0.8144 1 1 1;
];
PV.con = [ ...
2 100 69 0.4 1.03 0.15 -0.4 1.1 0.9 1 1;
3 100 69 0.4 1.01 0.15 -0.1 1.1 0.9 1 1;
6 100 138 0.3 1.03 0.1 -0.06 1.1 0.9 1 1;
8 100 69 0.35 1.03 0.1 -0.06 1.1 0.9 1 1;
];
PQ.con = [ ...
2 100 69 0.217 0.127 1.1 0.9 0 1;
3 100 69 0.5 0.25 1.1 0.9 0 1;
4 100 69 0.478 0.1 1.1 0.9 0 1;
5 100 69 0.076 0.016 1.1 0.9 0 1;
6 100 138 0.15 0.075 1.1 0.9 0 1;
9 100 138 0.295 0.166 1.1 0.9 0 1;
10 100 138 0.09 0.058 1.1 0.9 0 1;
11 100 138 0.035 0.018 1.1 0.9 0 1;
12 100 138 0.061 0.016 1.1 0.9 0 1;
13 100 138 0.135 0.058 1.1 0.9 0 1;
14 100 138 0.2 0.07 1.1 0.9 0 1;
7 100 138 0 0 1.1 0.9 0 1;
];
Shunt.con = [ ...
9 100 138 60 0 0.19 1;
14 100 138 60 0 0.15 1;
];
Line.con = [ ...
1 2 100 69 60 0 0 0.01938 0.05917 0.0528 0 0 1 1 0 1;
1 5 100 69 60 0 0 0.05403 0.223 0.0492 0 0 1 1 0 1;
2 3 100 69 60 0 0 0.04699 0.198 0.0438 0 0 1 1 0 1;
2 4 100 69 60 0 0 0.05811 0.1763 0.034 0 0 1 1 0 1;
2 5 100 69 60 0 0 0.05695 0.1739 0.0346 0 0 1 1 0 1;
3 4 100 69 60 0 0 0.06701 0.171 0.0128 0 0 1 1 0 1;
4 5 100 69 60 0 0 0.01335 0.04211 0 0 0 1 1 0 1;
6 11 100 138 60 0 0 0.09498 0.1989 0 0 0 1 1 0 1;
6 12 100 138 60 0 0 0.1229 0.2558 0 0 0 1 1 0 1;
6 13 100 138 60 0 0 0.06615 0.1303 0 0 0 1 1 0 1;
7 9 100 138 60 0 0 -0 0.11 0 0 0 1 1 0 1;
9 10 100 138 60 0 0 0.03181 0.0845 0 0 0 1 1 0 1;
9 14 100 138 60 0 0 0.1271 0.2704 0 0 0 1 1 0 1;
10 11 100 138 60 0 0 0.08205 0.1921 0 0 0 1 1 0 1;
12 13 100 138 60 0 0 0.2209 0.1999 0 0 0 1 1 0 1;
13 14 100 138 60 0 0 0.1709 0.348 0 0 0 1 1 0 1;
4 7 100 69 60 0 0.5 0 0.2091 0 0.9968 0 0.2 0.2 0 1;
4 9 100 69 60 0 0.5 0 0.5562 0 0.9968 0 0.2 0.2 0 1;
6 5 100 138 60 0 2 0 0.252 0 0.9968 0 0.5 0.5 0 1;
8 7 100 69 60 0 0.5 0 0.1762 0 0.9968 0 0.5 0.5 0 1;
];
Bus.names = {...
'BUS1'; 'BUS2'; 'BUS3'; 'BUS4'; 'BUS5';
'BUS6'; 'BUS7'; 'BUS8'; 'BUS9'; 'BUS10';
'BUS11'; 'BUS12'; 'BUS13'; 'BUS14'};

161
interface/data/d_ieee39.m Normal file
View File

@@ -0,0 +1,161 @@
% 03/16/23 File data originated from Matpower data file
%
Bus.con = [ ...
1 345 1.031 -0.2141 1 1;
2 345 1.002 -0.2502 1 1;
3 345 0.9535 -0.3343 1 1;
4 345 0.931 -0.3363 1 2;
5 345 0.9174 -0.3049 1 2;
6 345 0.9186 -0.2919 1 2;
7 345 0.8626 -0.3252 1 2;
8 345 0.88 -0.3322 1 2;
9 345 0.9788 -0.2449 1 2;
10 345 0.9562 -0.2565 1 2;
11 345 0.9429 -0.2703 1 2;
12 138 0.9449 -0.3003 1 2;
13 345 0.9523 -0.2722 1 2;
14 345 0.9465 -0.3029 2 3;
15 345 0.9565 -0.314 2 3;
16 345 0.9767 -0.2878 2 3;
17 345 0.9749 -0.3076 1 1;
18 345 0.9652 -0.3262 1 1;
19 345 1.03 -0.2038 2 4;
20 138 0.9798 -0.2297 2 4;
21 345 0.993 -0.2428 2 3;
22 345 1.029 -0.1615 2 3;
23 345 1.023 -0.1651 2 4;
24 345 0.9871 -0.2857 2 3;
25 345 1.021 -0.2356 1 1;
26 345 1.01 -0.2661 1 1;
27 345 0.9876 -0.3071 1 1;
28 345 1.02 -0.2014 2 3;
29 345 1.024 -0.1509 2 3;
30 34.5 1.005 -0.2041 1 1;
31 34.5 0.9064 -0.1583 1 2;
32 21 0.9752 -0.1068 1 2;
33 21 0.9972 -0.112 2 4;
34 15.5 1.012 -0.1387 2 4;
35 15.5 1.049 -0.07315 2 3;
36 12.5 1.063 -0.02552 2 4;
37 12.5 1.028 -0.1139 1 1;
38 34.5 1.026 -0.02585 2 3;
39 345 1.03 -0.1913 1 2;
];
SW.con = [ ...
39 1199 345 1.03 -0.1913 0.4794 -0.1445 1.05 0.95 0.6012 1 1 1;
];
PV.con = [ ...
30 275 34.5 0.9091 1.048 0.557 -0.2112 1.05 0.95 1 1;
31 836 34.5 0.6853 1.04 0.5141 -0.1467 1.05 0.95 1 1;
32 843.7 21 0.7704 0.9831 0.5295 -0.2136 1.05 0.95 1 1;
33 1175 21 0.538 0.9972 0.4666 -0.182 1.05 0.95 1 1;
34 1080 15.5 0.4703 1.012 0.5661 -0.1741 1.05 0.95 1 1;
35 1086 15.5 0.5987 1.049 0.5469 -0.2164 1.05 0.95 1 1;
36 1025 12.5 0.5462 1.063 0.5544 -0.243 1.05 0.95 1 1;
37 970.2 12.5 0.5566 1.028 0.4571 -0.2228 1.05 0.95 1 1;
38 1684 34.5 0.4928 1.026 0.4957 -0.2119 1.05 0.95 1 1;
10 900 345 0.1111 1.004 0.3287 -0.3287 1.05 0.95 1 1;
20 900 138 0.1667 1.004 0.3287 -0.3287 1.05 0.95 1 1;
2 900 345 0.2222 1.004 0.3287 -0.3287 1.05 0.95 1 1;
25 900 345 0.2778 1.004 0.3287 -0.3287 1.05 0.95 1 1;
];
PQ.con = [ ...
3 100 345 6 2.5 1.05 0.95 0 1;
4 100 345 4.5 1.84 1.05 0.95 0 1;
7 100 345 2.338 8.4 1.05 0.95 0 1;
8 100 345 5.22 1.76 1.05 0.95 0 1;
12 100 138 1.2 0.3 1.05 0.95 0 1;
15 100 345 3.2 1.53 1.05 0.95 0 1;
16 100 345 3.294 3.23 1.05 0.95 0 1;
18 100 345 1.58 0.3 1.05 0.95 0 1;
20 100 138 6.8 1.03 1.05 0.95 0 1;
21 100 345 2.74 1.15 1.05 0.95 0 1;
23 100 345 2.475 0.846 1.05 0.95 0 1;
24 100 345 3.086 -0.922 1.05 0.95 0 1;
25 100 345 2.24 0.472 1.05 0.95 0 1;
26 100 345 1.39 0.17 1.05 0.95 0 1;
27 100 345 2.81 0.755 1.05 0.95 0 1;
28 100 345 2.06 0.276 1.05 0.95 0 1;
29 100 345 2.835 1.269 1.05 0.95 0 1;
31 100 34.5 0.8 0.4 1.05 0.95 0 1;
39 100 345 4 2.5 1.05 0.95 0 1;
1 100 345 0 0 1.05 0.95 0 1;
5 100 345 0 0 1.05 0.95 0 1;
6 100 345 0 0 1.05 0.95 0 1;
9 100 345 0 0 1.05 0.95 0 1;
11 100 345 0 0 1.05 0.95 0 1;
13 100 345 0 0 1.05 0.95 0 1;
14 100 345 0 0 1.05 0.95 0 1;
17 100 345 0 0 1.05 0.95 0 1;
19 100 345 0 0 1.05 0.95 0 1;
22 100 345 0 0 1.05 0.95 0 1;
];
Shunt.con = [ ...
4 100 345 60 0 1 1;
5 100 345 60 0 2 1;
];
Line.con = [ ...
1 2 100 345 60 0 0 0.0035 0.0411 0.6987 0 0 1.75 1.92 1.92 1;
1 39 100 345 60 0 0 0.001 0.025 0.75 0 0 1.25 1.37 1.37 1;
2 3 100 345 60 0 0 0.0013 0.0151 0.2572 0 0 6.5 7.15 7.15 1;
2 25 100 345 60 0 0 0.007 0.0086 0.146 0 0 2.6 2.86 2.86 1;
3 4 100 345 60 0 0 0.0013 0.0213 0.2214 0 0 1.25 1.37 1.37 1;
3 18 100 345 60 0 0 0.0011 0.0133 0.2138 0 0 1.25 1.37 1.37 1;
4 5 100 345 60 0 0 0.0008 0.0128 0.1342 0 0 3 3.3 3.3 1;
4 14 100 345 60 0 0 0.0008 0.0129 0.1382 0 0 3 3.3 3.3 1;
5 6 100 345 60 0 0 0.0002 0.0026 0.0434 0 0 4.62 5.08 5.08 1;
5 8 100 345 60 0 0 0.0008 0.0112 0.1476 0 0 4.62 5.08 5.08 1;
6 7 100 345 60 0 0 0.0006 0.0092 0.113 0 0 7 7.7 7.7 1;
6 11 100 345 60 0 0 0.0007 0.0082 0.1389 0 0 4.66 5.12 5.12 1;
7 8 100 345 60 0 0 0.0004 0.0046 0.078 0 0 4.62 5.08 5.08 1;
8 9 100 345 60 0 0 0.0023 0.0363 0.3804 0 0 4.66 5.12 5.12 1;
9 39 100 345 60 0 0 0.001 0.025 1.2 0 0 4 4.4 4.4 1;
10 11 100 345 60 0 0 0.0004 0.0043 0.0729 0 0 4.62 5.08 5.08 1;
10 13 100 345 60 0 0 0.0004 0.0043 0.0729 0 0 4.29 4.71 4.71 1;
13 14 100 345 60 0 0 0.0009 0.0101 0.1723 0 0 3.8 4.18 4.18 1;
14 15 100 345 60 0 0 0.0018 0.0217 0.366 0 0 1.25 1.37 1.37 1;
15 16 100 345 60 0 0 0.0009 0.0094 0.171 0 0 4.29 4.71 4.71 1;
16 17 100 345 60 0 0 0.0007 0.0089 0.1342 0 0 2.6 2.86 2.86 1;
16 19 100 345 60 0 0 0.0016 0.0195 0.304 0 0 5.52 6.07 6.07 1;
16 21 100 345 60 0 0 0.0008 0.0135 0.2548 0 0 4.29 4.71 4.71 1;
16 24 100 345 60 0 0 0.0003 0.0059 0.068 0 0 2.3 2.53 2.53 1;
17 18 100 345 60 0 0 0.0007 0.0082 0.1319 0 0 3 3.3 3.3 1;
17 27 100 345 60 0 0 0.0013 0.0173 0.3216 0 0 1.25 1.37 1.37 1;
21 22 100 345 60 0 0 0.0008 0.014 0.2565 0 0 6.5 7.15 7.15 1;
22 23 100 345 60 0 0 0.0006 0.0096 0.1846 0 0 1.25 1.37 1.37 1;
23 24 100 345 60 0 0 0.0022 0.035 0.361 0 0 4.66 5.12 5.12 1;
25 26 100 345 60 0 0 0.0032 0.0323 0.513 0 0 1.25 1.37 1.37 1;
26 27 100 345 60 0 0 0.0014 0.0147 0.2396 0 0 3.8 4.18 4.18 1;
26 28 100 345 60 0 0 0.0043 0.0474 0.7802 0 0 1.75 1.92 1.92 1;
26 29 100 345 60 0 0 0.0057 0.0625 1.029 0 0 2.3 2.53 2.53 1;
28 29 100 345 60 0 0 0.0014 0.0151 0.249 0 0 4 4.4 4.4 1;
2 30 100 345 60 0 10 0 0.0181 0 1.025 0 3.8 4.18 4.18 1;
31 6 100 34.5 60 0 0.1 0 0.025 0 0.9 0 7 7.7 7.7 1;
10 32 100 345 60 0 16.43 0 0.02 0 1.07 0 8.16 8.97 8.97 1;
12 11 100 138 60 0 0.4 0.0016 0.0435 0 1.006 0 1.25 1.37 1.37 1;
12 13 100 138 60 0 0.4 0.0016 0.0435 0 1.006 0 1.25 1.37 1.37 1;
19 20 100 345 60 0 2.5 0.0007 0.0138 0 1.06 0 2.3 2.53 2.53 1;
19 33 100 345 60 0 16.43 0.0007 0.0142 0 1.07 0 7 7.7 7.7 1;
20 34 100 138 60 0 8.903 0.0009 0.018 0 1.009 0 5.6 6.16 6.16 1;
22 35 100 345 60 0 22.26 0 0.0143 0 1.025 0 7.15 7.86 7.86 1;
23 36 100 345 60 0 27.6 0.0005 0.0272 0 1 0 5.6 6.16 6.16 1;
25 37 100 345 60 0 27.6 0.0006 0.0232 0 1.025 0 5.52 6.07 6.07 1;
29 38 100 345 60 0 10 0.0008 0.0156 0 1.025 0 8.37 9.2 9.2 1;
];
Bus.names = {...
'BUS1'; 'BUS2'; 'LOAD3'; 'LOAD4'; 'BUS5';
'BUS6'; 'LOAD7'; 'LOAD8'; 'BUS9'; 'BUS10';
'BUS11'; 'LOAD12'; 'BUS13'; 'BUS14'; 'LOAD15';
'LOAD16'; 'BUS17'; 'LOAD18'; 'BUS19'; 'LOAD20';
'LOAD21'; 'BUS22'; 'LOAD23'; 'LOAD24'; 'LOAD25';
'LOAD26'; 'LOAD27'; 'LOAD28'; 'LOAD29'; 'GEN30';
'GEN31'; 'GEN32'; 'GEN33'; 'GEN34'; 'GEN35';
'GEN36'; 'GEN37'; 'GEN38'; 'GEN39'};

57
interface/data/d_kundur.m Normal file
View File

@@ -0,0 +1,57 @@
% 03/16/23 File data originated from Matpower data file
%
Bus.con = [ ...
1 20 1 0.5703 1 1;
2 20 1 0.3779 1 1;
3 20 1 0.1957 2 1;
4 20 1 0.3777 2 1;
5 230 0.9834 0.4826 1 1;
6 230 0.9691 0.2935 1 1;
7 230 0.9562 0.1425 1 1;
8 230 0.954 -0.03717 2 1;
9 230 0.9686 0.1113 2 1;
10 230 0.9838 0.2933 2 1;
];
SW.con = [ ...
1 900 20 1 0.5703 0.6667 0 1.1 0.9 0.8287 1 1 1;
];
PV.con = [ ...
2 900 20 0.7778 1 0.6667 -0.6667 1.1 0.9 1 1;
3 900 20 0.7778 1 0.6667 -0.6667 1.1 0.9 1 1;
4 900 20 0.7778 1 0.6667 -0.6667 1.1 0.9 1 1;
];
PQ.con = [ ...
7 100 230 11.59 -0.735 1.1 0.9 0 1;
8 100 230 15.75 -0.899 1.1 0.9 0 1;
5 100 230 0 0 1.1 0.9 0 1;
6 100 230 0 0 1.1 0.9 0 1;
9 100 230 0 0 1.1 0.9 0 1;
10 100 230 0 0 1.1 0.9 0 1;
];
Line.con = [ ...
5 6 100 230 60 0 0 0.005 0.05 0.075 0 0 0 0 0 1;
5 6 100 230 60 0 0 0.00501 0.05001 0.075 0 0 0 0 0 1;
6 7 100 230 60 0 0 0.002 0.02 0.03 0 0 0 0 0 1;
6 7 100 230 60 0 0 0.00201 0.02001 0.03 0 0 0 0 0 1;
7 8 100 230 60 0 0 0.02201 0.22 0.33 0 0 0 0 0 1;
7 8 100 230 60 0 0 0.02202 0.22 0.33 0 0 0 0 0 1;
7 8 100 230 60 0 0 0.022 0.22 0.33 0 0 0 0 0 1;
8 9 100 230 60 0 0 0.002 0.02 0.03 0 0 0 0 0 1;
8 9 100 230 60 0 0 0.00201 0.02001 0.03 0 0 0 0 0 1;
9 10 100 230 60 0 0 0.005 0.05 0.075 0 0 0 0 0 1;
9 10 100 230 60 0 0 0.00501 0.05001 0.075 0 0 0 0 0 1;
1 5 100 20 60 0 0.08696 0.001 0.012 0 1 0 0 0 0 1;
2 6 100 20 60 0 0.08696 0.001 0.012 0 1 0 0 0 0 1;
3 9 100 20 60 0 0.08696 0.001 0.012 0 1 0 0 0 0 1;
4 10 100 20 60 0 0.08696 0.001 0.012 0 1 0 0 0 0 1;
];
Bus.names = {...
'1'; '2'; '12'; '11'; '101';
'102'; '3'; '13'; '112'; '111'};

View File

@@ -0,0 +1,79 @@
% 03/16/23 File data originated from Matpower data file
%
Bus.con = [ ...
1 69 1.03 0 1 1;
2 69 1.02 -0.02798 1 1;
3 69 1 -0.0601 1 1;
4 69 0.9986 -0.07472 1 1;
5 69 1.004 -0.06432 1 1;
6 138 0.9987 -0.11 2 2;
7 138 1.007 -0.08429 2 2;
8 69 1.019 -0.02434 2 2;
9 138 1.002 -0.1275 2 2;
10 138 0.9935 -0.1302 2 2;
11 138 0.9925 -0.1229 2 2;
12 138 0.9864 -0.1289 2 2;
13 138 0.984 -0.1338 2 2;
14 138 0.9906 -0.1669 2 2;
];
SW.con = [ ...
1 100 69 1.03 0 1 -0.5 1.1 0.9 0.8144 1 1 1;
];
PV.con = [ ...
2 100 69 0.4 1.03 0.15 -0.4 1.1 0.9 1 1;
3 100 69 0.4 1.01 0.15 -0.1 1.1 0.9 1 1;
6 100 138 0.3 1.03 0.1 -0.06 1.1 0.9 1 1;
8 100 69 0.35 1.03 0.1 -0.06 1.1 0.9 1 1;
];
PQ.con = [ ...
2 100 69 0.217 0.127 1.1 0.9 0 1;
3 100 69 0.5 0.25 1.1 0.9 0 1;
4 100 69 0.478 0.1 1.1 0.9 0 1;
5 100 69 0.076 0.016 1.1 0.9 0 1;
6 100 138 0.15 0.075 1.1 0.9 0 1;
9 100 138 0.295 0.166 1.1 0.9 0 1;
10 100 138 0.09 0.058 1.1 0.9 0 1;
11 100 138 0.035 0.018 1.1 0.9 0 1;
12 100 138 0.061 0.016 1.1 0.9 0 1;
13 100 138 0.135 0.058 1.1 0.9 0 1;
14 100 138 0.2 0.07 1.1 0.9 0 1;
7 100 138 0 0 1.1 0.9 0 1;
];
Shunt.con = [ ...
9 100 138 60 0 0.19 1;
14 100 138 60 0 0.15 1;
];
Line.con = [ ...
1 2 100 69 60 0 0 0.01938 0.05917 0.0528 0 0 1 1 0 1;
1 5 100 69 60 0 0 0.05403 0.223 0.0492 0 0 1 1 0 1;
2 3 100 69 60 0 0 0.04699 0.198 0.0438 0 0 1 1 0 1;
2 4 100 69 60 0 0 0.05811 0.1763 0.034 0 0 1 1 0 1;
2 5 100 69 60 0 0 0.05695 0.1739 0.0346 0 0 1 1 0 1;
3 4 100 69 60 0 0 0.06701 0.171 0.0128 0 0 1 1 0 1;
4 5 100 69 60 0 0 0.01335 0.04211 0 0 0 1 1 0 1;
6 11 100 138 60 0 0 0.09498 0.1989 0 0 0 1 1 0 1;
6 12 100 138 60 0 0 0.1229 0.2558 0 0 0 1 1 0 1;
6 13 100 138 60 0 0 0.06615 0.1303 0 0 0 1 1 0 1;
7 9 100 138 60 0 0 -0 0.11 0 0 0 1 1 0 1;
9 10 100 138 60 0 0 0.03181 0.0845 0 0 0 1 1 0 1;
9 14 100 138 60 0 0 0.1271 0.2704 0 0 0 1 1 0 1;
10 11 100 138 60 0 0 0.08205 0.1921 0 0 0 1 1 0 1;
12 13 100 138 60 0 0 0.2209 0.1999 0 0 0 1 1 0 1;
13 14 100 138 60 0 0 0.1709 0.348 0 0 0 1 1 0 1;
4 7 100 69 60 0 0.5 0 0.2091 0 0.9968 0 0.2 0.2 0 1;
4 9 100 69 60 0 0.5 0 0.5562 0 0.9968 0 0.2 0.2 0 1;
6 5 100 138 60 0 2 0 0.252 0 0.9968 0 0.5 0.5 0 1;
8 7 100 69 60 0 0.5 0 0.1762 0 0.9968 0 0.5 0.5 0 1;
];
Bus.names = {...
'BUS1'; 'BUS2'; 'BUS3'; 'BUS4'; 'BUS5';
'BUS6'; 'BUS7'; 'BUS8'; 'BUS9'; 'BUS10';
'BUS11'; 'BUS12'; 'BUS13'; 'BUS14'};

94
interface/data/ieee14.m Normal file
View File

@@ -0,0 +1,94 @@
function mpc = ieee14
%IEEE14
% PSS(R)E 32 RAW created by rawd32 SUN, MAY 17 2020 20:38
% IEEE 14 BUS TEST CASE
% 03/06/14 CONTO 100.0 1962 W
%
% Converted by MATPOWER 7.1 using PSSE2MPC on 16-Mar-2023
% from 'ieee14.raw' using PSS/E rev 32 format.
%
% WARNINGS:
% Skipped 2 lines of zone data.
% Skipped 2 lines of owner data.
% Using default voltage magnitude limits: VMIN = 0.9 p.u., VMAX = 1.1 p.u.
%
% See CASEFORMAT for details on the MATPOWER case file format.
%% MATPOWER Case Format : Version 2
mpc.version = '2';
%%----- Power Flow Data -----%%
%% system MVA base
mpc.baseMVA = 100;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 3 0 0 0 0 1 1.03 0 69 1 1.1 0.9;
2 2 21.7 12.7 0 0 1 1.0197 -1.6032 69 1 1.1 0.9;
3 2 50 25 0 0 1 1.00042 -3.4433 69 1 1.1 0.9;
4 1 47.8 10 0 0 1 0.99858 -4.2812 69 1 1.1 0.9;
5 1 7.6 1.6 0 0 1 1.00443 -3.685 69 1 1.1 0.9;
6 2 15 7.5 0 0 2 0.99871 -6.3024 138 2 1.1 0.9;
7 1 0 0 0 0 2 1.00682 -4.8292 138 2 1.1 0.9;
8 2 0 0 0 0 2 1.01895 -1.3945 69 2 1.1 0.9;
9 1 29.5 16.6 0 19 2 1.00193 -7.3053 138 2 1.1 0.9;
10 1 9 5.8 0 0 2 0.99351 -7.46 138 2 1.1 0.9;
11 1 3.5 1.8 0 0 2 0.99245 -7.0444 138 2 1.1 0.9;
12 1 6.1 1.6 0 0 2 0.98639 -7.3874 138 2 1.1 0.9;
13 1 13.5 5.8 0 0 2 0.98403 -7.6654 138 2 1.1 0.9;
14 1 20 7 0 15 2 0.99063 -9.5636 138 2 1.1 0.9;
];
%% generator data
% 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 81.442 1.962 100 -50 1.03 100 1 200 50 0 0 0 0 0 0 0 0 0 0 0;
2 40 15 15 -40 1.03 100 1 50 10 0 0 0 0 0 0 0 0 0 0 0;
3 40 15 15 -10 1.01 100 1 50 10 0 0 0 0 0 0 0 0 0 0 0;
6 30 10 10 -6 1.03 100 1 50 10 0 0 0 0 0 0 0 0 0 0 0;
8 35 10 10 -6 1.03 100 1 50 10 0 0 0 0 0 0 0 0 0 0 0;
];
%% branch data
% fbus tbus r x b rateA rateB rateC ratio angle status angmin angmax
mpc.branch = [
1 2 0.01938 0.05917 0.0528 100 100 0 0 0 1 -360 360;
1 5 0.05403 0.22304 0.0492 100 100 0 0 0 1 -360 360;
2 3 0.04699 0.19797 0.0438 100 100 0 0 0 1 -360 360;
2 4 0.05811 0.17632 0.034 100 100 0 0 0 1 -360 360;
2 5 0.05695 0.17388 0.0346 100 100 0 0 0 1 -360 360;
3 4 0.06701 0.17103 0.0128 100 100 0 0 0 1 -360 360;
4 5 0.01335 0.04211 0 100 100 0 0 0 1 -360 360;
6 11 0.09498 0.1989 0 100 100 0 0 0 1 -360 360;
6 12 0.12291 0.25581 0 100 100 0 0 0 1 -360 360;
6 13 0.06615 0.13027 0 100 100 0 0 0 1 -360 360;
7 9 -0 0.11001 0 100 100 0 0 0 1 -360 360;
9 10 0.03181 0.0845 0 100 100 0 0 0 1 -360 360;
9 14 0.12711 0.27038 0 100 100 0 0 0 1 -360 360;
10 11 0.08205 0.19207 0 100 100 0 0 0 1 -360 360;
12 13 0.22092 0.19988 0 100 100 0 0 0 1 -360 360;
13 14 0.17093 0.34802 0 100 100 0 0 0 1 -360 360;
4 7 0 0.20912 0 20 20 0 0.99677 0 1 -360 360;
4 9 0 0.55618 0 20 20 0 0.99677 0 1 -360 360;
6 5 0 0.25202 0 50 50 0 0.99677 0 1 -360 360;
8 7 0 0.17615 0 50 50 0 0.99677 0 1 -360 360;
];
%% bus names
mpc.bus_name = {
'BUS1 ';
'BUS2 ';
'BUS3 ';
'BUS4 ';
'BUS5 ';
'BUS6 ';
'BUS7 ';
'BUS8 ';
'BUS9 ';
'BUS10 ';
'BUS11 ';
'BUS12 ';
'BUS13 ';
'BUS14 ';
};

181
interface/data/ieee39.m Normal file
View File

@@ -0,0 +1,181 @@
function mpc = ieee39
%IEEE39
% PSS(R)E-33.11 FRI, APR 13 2018 10:22
% NEW ENGLAND TEST SYSTEM, 39 BUSES, 9 GENERATORS, 2 Areas, 4 Zones
% UPDATED BY JOSE CONTO
%
% Converted by MATPOWER 7.1 using PSSE2MPC on 16-Mar-2023
% from 'ieee39.raw' using PSS/E rev 33 format.
%
% WARNINGS:
% Section label mismatch, found 'VSC DC LINE', expected 'VOLTAGE SOURCE CONVERTER'
% Skipped 4 lines of zone data.
% Skipped 2 lines of owner data.
% Section label mismatch, found 'FACTS DEVICE', expected 'FACTS CONTROL DEVICE'
% Section label mismatch, found 'GNE', expected 'GNE DEVICE'
%
% See CASEFORMAT for details on the MATPOWER case file format.
%% MATPOWER Case Format : Version 2
mpc.version = '2';
%%----- Power Flow Data -----%%
%% system MVA base
mpc.baseMVA = 100;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 1 0 0 0 0 1 1.03145 -12.2668 345 1 1.05 0.95;
2 2 0 0 0 0 1 1.00247 -14.3363 345 1 1.05 0.95;
3 1 600 250 0 0 1 0.95348 -19.1513 345 1 1.05 0.95;
4 1 450 184 0 100 1 0.93103 -19.2658 345 2 1.05 0.95;
5 1 0 0 0 200 1 0.91744 -17.4681 345 2 1.05 0.95;
6 1 0 0 0 0 1 0.91858 -16.7257 345 2 1.05 0.95;
7 1 233.8 840 0 0 1 0.86255 -18.6341 345 2 1.05 0.95;
8 1 522 176 0 0 1 0.87995 -19.032 345 2 1.05 0.95;
9 1 0 0 0 0 1 0.9788 -14.0303 345 2 1.05 0.95;
10 2 0 0 0 0 1 0.95616 -14.6962 345 2 1.05 0.95;
11 1 0 0 0 0 1 0.94295 -15.4844 345 2 1.05 0.95;
12 1 120 30 0 0 1 0.94491 -17.2039 138 2 1.05 0.95;
13 1 0 0 0 0 1 0.95234 -15.5933 345 2 1.05 0.95;
14 1 0 0 0 0 2 0.94651 -17.355 345 3 1.05 0.95;
15 1 320 153 0 0 2 0.95647 -17.9924 345 3 1.05 0.95;
16 1 329.4 323 0 0 2 0.97673 -16.4894 345 3 1.05 0.95;
17 1 0 0 0 0 1 0.97495 -17.6268 345 1 1.05 0.95;
18 1 158 30 0 0 1 0.9652 -18.6881 345 1 1.05 0.95;
19 1 0 0 0 0 2 1.02958 -11.6791 345 4 1.05 0.95;
20 2 680 103 0 0 2 0.97981 -13.1611 138 4 1.05 0.95;
21 1 274 115 0 0 2 0.99298 -13.9095 345 3 1.05 0.95;
22 1 0 0 0 0 2 1.02902 -9.2532 345 3 1.05 0.95;
23 1 247.5 84.6 0 0 2 1.02329 -9.4586 345 4 1.05 0.95;
24 1 308.6 -92.2 0 0 2 0.98714 -16.3712 345 3 1.05 0.95;
25 2 224 47.2 0 0 1 1.02124 -13.4991 345 1 1.05 0.95;
26 1 139 17 0 0 1 1.01034 -15.2439 345 1 1.05 0.95;
27 1 281 75.5 0 0 1 0.98758 -17.5932 345 1 1.05 0.95;
28 1 206 27.6 0 0 2 1.02015 -11.5383 345 3 1.05 0.95;
29 1 283.5 126.9 0 0 2 1.02428 -8.6481 345 3 1.05 0.95;
30 2 0 0 0 0 1 1.00458 -11.6965 34.5 1 1.05 0.95;
31 2 80 40 0 0 1 0.90644 -9.0711 34.5 2 1.05 0.95;
32 2 0 0 0 0 1 0.97522 -6.1171 21 2 1.05 0.95;
33 2 0 0 0 0 2 0.9972 -6.4145 21 4 1.05 0.95;
34 2 0 0 0 0 2 1.0123 -7.9444 15.5 4 1.05 0.95;
35 2 0 0 0 0 2 1.0493 -4.1911 15.5 3 1.05 0.95;
36 2 0 0 0 0 2 1.0635 -1.4621 12.5 4 1.05 0.95;
37 2 0 0 0 0 1 1.0278 -6.5254 12.5 1 1.05 0.95;
38 2 0 0 0 0 2 1.0265 -1.4812 34.5 3 1.05 0.95;
39 3 400 250 0 0 1 1.03 -10.96 345 2 1.05 0.95;
];
%% generator data
% 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 = [
30 250 153.18 153.18 -58.084 1.0475 275 1 250 0 0 0 0 0 0 0 0 0 0 0 0;
31 572.93 429.804 429.804 -122.665 1.04 836 1 760 0 0 0 0 0 0 0 0 0 0 0 0;
32 650 446.722 446.722 -180.218 0.9831 843.7 1 767 0 0 0 0 0 0 0 0 0 0 0 0;
33 632 242.94 548.208 -213.78 0.9972 1174.8 1 1068 0 0 0 0 0 0 0 0 0 0 0 0;
34 508 229.094 611.495 -188.028 1.0123 1080.2 1 982 0 0 0 0 0 0 0 0 0 0 0 0;
35 650 361.684 593.788 -234.972 1.0493 1085.7 1 987 0 0 0 0 0 0 0 0 0 0 0 0;
36 560 185.829 568.372 -249.132 1.0635 1025.2 1 932 0 0 0 0 0 0 0 0 0 0 0 0;
37 540 158.09 443.468 -216.122 1.0278 970.2 1 882 0 0 0 0 0 0 0 0 0 0 0 0;
38 830 187.815 834.775 -356.889 1.0265 1684.1 1 1531 0 0 0 0 0 0 0 0 0 0 0 0;
39 720.876 345.605 574.85 -173.261 1.03 1199 1 1090 0 0 0 0 0 0 0 0 0 0 0 0;
10 100 27.003 295.816 -295.816 1.0037 900 1 900 0 0 0 0 0 0 0 0 0 0 0 0;
20 150 27.003 295.816 -295.816 1.0037 900 1 900 0 0 0 0 0 0 0 0 0 0 0 0;
2 200 27.003 295.816 -295.816 1.0037 900 1 900 0 0 0 0 0 0 0 0 0 0 0 0;
25 250 27.003 295.816 -295.816 1.0037 900 1 900 0 0 0 0 0 0 0 0 0 0 0 0;
];
%% branch data
% fbus tbus r x b rateA rateB rateC ratio angle status angmin angmax
mpc.branch = [
1 2 0.0035 0.0411 0.6987 175 192 192 0 0 1 -360 360;
1 39 0.001 0.025 0.75 125 137 137 0 0 1 -360 360;
2 3 0.0013 0.0151 0.2572 650 715 715 0 0 1 -360 360;
2 25 0.007 0.0086 0.146 260 286 286 0 0 1 -360 360;
3 4 0.0013 0.0213 0.2214 125 137 137 0 0 1 -360 360;
3 18 0.0011 0.0133 0.2138 125 137 137 0 0 1 -360 360;
4 5 0.0008 0.0128 0.1342 300 330 330 0 0 1 -360 360;
4 14 0.0008 0.0129 0.1382 300 330 330 0 0 1 -360 360;
5 6 0.0002 0.0026 0.0434 462 508 508 0 0 1 -360 360;
5 8 0.0008 0.0112 0.1476 462 508 508 0 0 1 -360 360;
6 7 0.0006 0.0092 0.113 700 770 770 0 0 1 -360 360;
6 11 0.0007 0.0082 0.1389 466 512 512 0 0 1 -360 360;
7 8 0.0004 0.0046 0.078 462 508 508 0 0 1 -360 360;
8 9 0.0023 0.0363 0.3804 466 512 512 0 0 1 -360 360;
9 39 0.001 0.025 1.2 400 440 440 0 0 1 -360 360;
10 11 0.0004 0.0043 0.0729 462 508 508 0 0 1 -360 360;
10 13 0.0004 0.0043 0.0729 429 471 471 0 0 1 -360 360;
13 14 0.0009 0.0101 0.1723 380 418 418 0 0 1 -360 360;
14 15 0.0018 0.0217 0.366 125 137 137 0 0 1 -360 360;
15 16 0.0009 0.0094 0.171 429 471 471 0 0 1 -360 360;
16 17 0.0007 0.0089 0.1342 260 286 286 0 0 1 -360 360;
16 19 0.0016 0.0195 0.304 552 607 607 0 0 1 -360 360;
16 21 0.0008 0.0135 0.2548 429 471 471 0 0 1 -360 360;
16 24 0.0003 0.0059 0.068 230 253 253 0 0 1 -360 360;
17 18 0.0007 0.0082 0.1319 300 330 330 0 0 1 -360 360;
17 27 0.0013 0.0173 0.3216 125 137 137 0 0 1 -360 360;
21 22 0.0008 0.014 0.2565 650 715 715 0 0 1 -360 360;
22 23 0.0006 0.0096 0.1846 125 137 137 0 0 1 -360 360;
23 24 0.0022 0.035 0.361 466 512 512 0 0 1 -360 360;
25 26 0.0032 0.0323 0.513 125 137 137 0 0 1 -360 360;
26 27 0.0014 0.0147 0.2396 380 418 418 0 0 1 -360 360;
26 28 0.0043 0.0474 0.7802 175 192 192 0 0 1 -360 360;
26 29 0.0057 0.0625 1.029 230 253 253 0 0 1 -360 360;
28 29 0.0014 0.0151 0.249 400 440 440 0 0 1 -360 360;
2 30 0 0.0181 0 380 418 418 1.025 0 1 -360 360;
31 6 0 0.025 0 700 770 770 0.9 0 1 -360 360;
10 32 0 0.02 0 816 897 897 1.07 0 1 -360 360;
12 11 0.0016 0.0435 0 125 137 137 1.006 0 1 -360 360;
12 13 0.0016 0.0435 0 125 137 137 1.006 0 1 -360 360;
19 20 0.0007 0.0138 0 230 253 253 1.06 0 1 -360 360;
19 33 0.0007 0.0142 0 700 770 770 1.07 0 1 -360 360;
20 34 0.0009 0.018 0 560 616 616 1.009 0 1 -360 360;
22 35 0 0.0143 0 715 786 786 1.025 0 1 -360 360;
23 36 0.0005 0.0272 0 560 616 616 1 0 1 -360 360;
25 37 0.0006 0.0232 0 552 607 607 1.025 0 1 -360 360;
29 38 0.0008 0.0156 0 837 920 920 1.025 0 1 -360 360;
];
%% bus names
mpc.bus_name = {
'BUS1 ';
'BUS2 ';
'LOAD3 ';
'LOAD4 ';
'BUS5 ';
'BUS6 ';
'LOAD7 ';
'LOAD8 ';
'BUS9 ';
'BUS10 ';
'BUS11 ';
'LOAD12 ';
'BUS13 ';
'BUS14 ';
'LOAD15 ';
'LOAD16 ';
'BUS17 ';
'LOAD18 ';
'BUS19 ';
'LOAD20 ';
'LOAD21 ';
'BUS22 ';
'LOAD23 ';
'LOAD24 ';
'LOAD25 ';
'LOAD26 ';
'LOAD27 ';
'LOAD28 ';
'LOAD29 ';
'GEN30 ';
'GEN31 ';
'GEN32 ';
'GEN33 ';
'GEN34 ';
'GEN35 ';
'GEN36 ';
'GEN37 ';
'GEN38 ';
'GEN39 ';
};

80
interface/data/kundur.m Normal file
View File

@@ -0,0 +1,80 @@
function mpc = kundur
%KUNDUR
% PSS(R)E 32 RAW created by rawd32 THU, JAN 30 2020 10:51
% MODIFIED KUNDUR'S TWO-AREA TEST SYSTEM, DISTRIBUTED WITH ANDES
% SEE THE BOOK "POWER SYSTEM STABILITY AND CONTROL" FOR ORIGINAL DATA
%
% Converted by MATPOWER 7.1 using PSSE2MPC on 16-Mar-2023
% from 'kundur.raw' using PSS/E rev 32 format.
%
% WARNINGS:
% Skipped 1 line of zone data.
% Skipped 1 line of owner data.
% Using default voltage magnitude limits: VMIN = 0.9 p.u., VMAX = 1.1 p.u.
%
% See CASEFORMAT for details on the MATPOWER case file format.
%% MATPOWER Case Format : Version 2
mpc.version = '2';
%%----- Power Flow Data -----%%
%% system MVA base
mpc.baseMVA = 100;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 3 0 0 0 0 1 1 32.6732 20 1 1.1 0.9;
2 2 0 0 0 0 1 1 21.6548 20 1 1.1 0.9;
3 2 0 0 0 0 2 1 11.2148 20 1 1.1 0.9;
4 2 0 0 0 0 2 1 21.6398 20 1 1.1 0.9;
5 1 0 0 0 0 1 0.98337 27.6488 230 1 1.1 0.9;
6 1 0 0 0 0 1 0.96908 16.8176 230 1 1.1 0.9;
7 1 1159 -73.5 0 0 1 0.95621 8.1662 230 1 1.1 0.9;
8 1 1575 -89.9 0 0 2 0.954 -2.1295 230 1 1.1 0.9;
9 1 0 0 0 0 2 0.96856 6.3774 230 1 1.1 0.9;
10 1 0 0 0 0 2 0.98377 16.8036 230 1 1.1 0.9;
];
%% generator data
% 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 745.861 143.612 600 0 1 900 1 900 0 0 0 0 0 0 0 0 0 0 0 0;
2 700 300 600 -600 1 900 1 900 0 0 0 0 0 0 0 0 0 0 0 0;
3 700 550 600 -600 1 900 1 900 0 0 0 0 0 0 0 0 0 0 0 0;
4 700 -100 600 -600 1 900 1 900 0 0 0 0 0 0 0 0 0 0 0 0;
];
%% branch data
% fbus tbus r x b rateA rateB rateC ratio angle status angmin angmax
mpc.branch = [
5 6 0.005 0.05 0.075 0 0 0 0 0 1 -360 360;
5 6 0.00501 0.05001 0.075 0 0 0 0 0 1 -360 360;
6 7 0.002 0.02 0.03 0 0 0 0 0 1 -360 360;
6 7 0.00201 0.02001 0.03 0 0 0 0 0 1 -360 360;
7 8 0.02201 0.22001 0.33 0 0 0 0 0 1 -360 360;
7 8 0.02202 0.22002 0.33 0 0 0 0 0 1 -360 360;
7 8 0.022 0.22 0.33 0 0 0 0 0 1 -360 360;
8 9 0.002 0.02 0.03 0 0 0 0 0 1 -360 360;
8 9 0.00201 0.02001 0.03 0 0 0 0 0 1 -360 360;
9 10 0.005 0.05 0.075 0 0 0 0 0 1 -360 360;
9 10 0.00501 0.05001 0.075 0 0 0 0 0 1 -360 360;
1 5 0.001 0.012 0 0 0 0 1 0 1 -360 360;
2 6 0.001 0.012 0 0 0 0 1 0 1 -360 360;
3 9 0.001 0.012 0 0 0 0 1 0 1 -360 360;
4 10 0.001 0.012 0 0 0 0 1 0 1 -360 360;
];
%% bus names
mpc.bus_name = {
'1 ';
'2 ';
'12 ';
'11 ';
'101 ';
'102 ';
'3 ';
'13 ';
'112 ';
'111 ';
};

View File

@@ -0,0 +1,7 @@
casename = 'ieee14';
%
[mpc, warnings] = psse2mpc(horzcat(casename,'.raw'),horzcat(casename,'.m'));
check = matpower2psat(horzcat(casename,'.m'), pwd);
return

51
interface/ex_cpf.m Normal file
View File

@@ -0,0 +1,51 @@
% EXAMPLE: continuation power flow
%
% in Software PowerSAS.m
% Author: Rui Yao <ruiyao@ieee.org>
%
% Copyright (C) 2021, UChicago Argonne, LLC. All rights reserved.
%
% OPEN SOURCE LICENSE
%
% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
%
% 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
% 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
% 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
%
%
% ******************************************************************************************************
% DISCLAIMER
%
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
% WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
% PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
% DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
% ***************************************************************************************************
clear;
clc;
global Global_Settings
Global_Settings.logLevel='INFO';
res_npcc140_zip=runPowerSAS('pf','d_ieee14');
res_npcc140_zip_cpf=runPowerSAS('cpf','d_ieee14',[],res_npcc140_zip.SysDataBase.zip,[],res_npcc140_zip.snapshot);
plotCurves(1,res_npcc140_zip_cpf.t,res_npcc140_zip_cpf.stateCurve,res_npcc140_zip_cpf.SysDataBase,'v');
%%
res_npcc140_zip=runPowerSAS('pf','d_ieee39');
res_npcc140_zip_cpf=runPowerSAS('cpf','d_ieee39',[],res_npcc140_zip.SysDataBase.zip,[],res_npcc140_zip.snapshot);
plotCurves(1,res_npcc140_zip_cpf.t,res_npcc140_zip_cpf.stateCurve,res_npcc140_zip_cpf.SysDataBase,'v');
%%
res_npcc140_zip=runPowerSAS('pf','d_kundur');
res_npcc140_zip_cpf=runPowerSAS('cpf','d_kundur',[],res_npcc140_zip.SysDataBase.zip,[],res_npcc140_zip.snapshot);
plotCurves(1,res_npcc140_zip_cpf.t,res_npcc140_zip_cpf.stateCurve,res_npcc140_zip_cpf.SysDataBase,'v');
return

38
interface/ex_pf.m Normal file
View File

@@ -0,0 +1,38 @@
% EXAMPLE: steady-state
%
% in Software PowerSAS.m
% Author: Rui Yao <ruiyao@ieee.org>
%
% Copyright (C) 2021, UChicago Argonne, LLC. All rights reserved.
%
% OPEN SOURCE LICENSE
%
% Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
%
% 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
% 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
% 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
%
%
% ******************************************************************************************************
% DISCLAIMER
%
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
% WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
% PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
% DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
% ***************************************************************************************************
clear;
clc;
global Global_Settings
Global_Settings.logLevel='INFO';
res_ieee14=runPowerSAS('pf','d_ieee14.m');
res_ieee39=runPowerSAS('pf','d_ieee39.m');
res_kundur=runPowerSAS('pf','d_kundur.m');