Skip to content

Commit 1050018

Browse files
authored
Merge pull request #172 from alliander-opensource/feature/example-notebook
Add notebook for pp asym calculation, fix its warning
2 parents d4bb730 + 85523ac commit 1050018

File tree

4 files changed

+138
-51
lines changed

4 files changed

+138
-51
lines changed

docs/examples/data/pandapower/example_simple_input.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,47 +10,47 @@
1010
],
1111
"line":
1212
[
13-
{"id": 6, "from_node": 2, "to_node": 1, "from_status": 1, "to_status": 1, "r1": 0.12792, "x1": 0.0492, "c1": 6.4206e-07, "tan1": 0.0, "i_n": 108.0, "id_reference": {"table": "line", "index": 101}}
13+
{"id": 6, "from_node": 2, "to_node": 1, "from_status": 1, "to_status": 1, "r1": 0.12792, "x1": 0.0492, "c1": 6.4206e-07, "tan1": 0.0, "i_n": 108.0, "id_reference": {"table": "line", "index": 101}, "pgm_input": {"from_node": 2, "to_node": 1, "i_n": 108.0}}
1414
],
1515
"source":
1616
[
17-
{"id": 7, "node": 0, "status": 1, "u_ref": 1.0, "u_ref_angle": 0.0, "sk": 1e+16, "rx_ratio": 0.0, "id_reference": {"table": "ext_grid", "index": 1}}
17+
{"id": 7, "node": 0, "status": 1, "u_ref": 1.0, "u_ref_angle": 0.0, "sk": 1e+16, "rx_ratio": 0.0, "id_reference": {"table": "ext_grid", "index": 1}, "pgm_input": {"node": 0}}
1818
],
1919
"sym_load":
2020
[
21-
{"id": 8, "node": 2, "status": 1, "type": 0, "p_specified": 575000.0, "q_specified": 55200.0, "id_reference": {"table": "load", "name": "const_power", "index": 101}},
22-
{"id": 9, "node": 2, "status": 1, "type": 1, "p_specified": 1275000.0, "q_specified": 122400.0, "id_reference": {"table": "load", "name": "const_impedance", "index": 101}},
23-
{"id": 10, "node": 2, "status": 1, "type": 2, "p_specified": 650000.0, "q_specified": 62400.0, "id_reference": {"table": "load", "name": "const_current", "index": 101}},
24-
{"id": 18, "node": 4, "status": 1, "type": 0, "p_specified": 100000.0, "q_specified": 100000.0, "id_reference": {"table": "ward", "name": "ward_const_power_load", "index": 34}},
25-
{"id": 19, "node": 4, "status": 1, "type": 1, "p_specified": 100000.0, "q_specified": 100000.0, "id_reference": {"table": "ward", "name": "ward_const_impedance_load", "index": 34}},
26-
{"id": 20, "node": 4, "status": 1, "type": 0, "p_specified": 71111.11111111111, "q_specified": 34440.68301069173, "id_reference": {"table": "motor", "name": "motor_load", "index": 12}}
21+
{"id": 8, "node": 2, "status": 1, "type": 0, "p_specified": 575000.0, "q_specified": 55200.0, "id_reference": {"table": "load", "name": "const_power", "index": 101}, "pgm_input": {"node": 2}},
22+
{"id": 9, "node": 2, "status": 1, "type": 1, "p_specified": 1275000.0, "q_specified": 122400.0, "id_reference": {"table": "load", "name": "const_impedance", "index": 101}, "pgm_input": {"node": 2}},
23+
{"id": 10, "node": 2, "status": 1, "type": 2, "p_specified": 650000.0, "q_specified": 62400.0, "id_reference": {"table": "load", "name": "const_current", "index": 101}, "pgm_input": {"node": 2}},
24+
{"id": 18, "node": 4, "status": 1, "type": 0, "p_specified": 100000.0, "q_specified": 100000.0, "id_reference": {"table": "ward", "name": "ward_const_power_load", "index": 34}, "pgm_input": {"node": 4}},
25+
{"id": 19, "node": 4, "status": 1, "type": 1, "p_specified": 100000.0, "q_specified": 100000.0, "id_reference": {"table": "ward", "name": "ward_const_impedance_load", "index": 34}, "pgm_input": {"node": 4}},
26+
{"id": 20, "node": 4, "status": 1, "type": 0, "p_specified": 71111.11111111111, "q_specified": 34440.68301069173, "id_reference": {"table": "motor", "name": "motor_load", "index": 12}, "pgm_input": {"node": 4}}
2727
],
2828
"shunt":
2929
[
30-
{"id": 11, "node": 3, "status": 1, "g1": 0.00033112217304444763, "b1": -0.001821171951744462, "id_reference": {"table": "shunt", "index": 1201}}
30+
{"id": 11, "node": 3, "status": 1, "g1": 0.00033112217304444763, "b1": -0.001821171951744462, "g0": 0.00033112217304444763, "b0": -0.001821171951744462, "id_reference": {"table": "shunt", "index": 1201}, "pgm_input": {"node": 3}}
3131
],
3232
"transformer":
3333
[
34-
{"id": 12, "from_node": 0, "to_node": 1, "from_status": 1, "to_status": 1, "u1": 110000.0, "u2": 20000.0, "sn": 80000000.0, "uk": 0.17800000000000002, "pk": 8176000.0, "i0": 0.03, "p0": 23200.0, "winding_from": 2, "winding_to": 1, "clock": 1, "tap_side": 0, "tap_pos": 2, "tap_min": -1, "tap_max": 3, "tap_nom": 1, "tap_size": 2200.0, "id_reference": {"table": "trafo", "index": 101}}
34+
{"id": 12, "from_node": 0, "to_node": 1, "from_status": 1, "to_status": 1, "u1": 110000.0, "u2": 20000.0, "sn": 80000000.0, "uk": 0.17800000000000002, "pk": 8176000.0, "i0": 0.03, "p0": 23200.0, "winding_from": 2, "winding_to": 1, "clock": 1, "tap_side": 0, "tap_pos": 2, "tap_min": -1, "tap_max": 3, "tap_nom": 1, "tap_size": 2200.0, "id_reference": {"table": "trafo", "index": 101}, "pgm_input": {"from_node": 0, "to_node": 1}, "pp_input": {"df": 1.0}}
3535
],
3636
"sym_gen":
3737
[
38-
{"id": 13, "node": 4, "status": 1, "type": 0, "p_specified": 1210000.0, "q_specified": 810000.0, "id_reference": {"table": "sgen", "index": 31}}
38+
{"id": 13, "node": 4, "status": 1, "type": 0, "p_specified": 1210000.0, "q_specified": 810000.0, "id_reference": {"table": "sgen", "index": 31}, "pgm_input": {"node": 4}}
3939
],
4040
"three_winding_transformer":
4141
[
42-
{"id": 14, "node_1": 2, "node_2": 4, "node_3": 3, "status_1": 1, "status_2": 1, "status_3": 1, "u1": 20000.0, "u2": 60000.0, "u3": 30100.0, "sn_1": 40000000.0, "sn_2": 100000000.0, "sn_3": 50000000.0, "uk_12": 0.1, "uk_13": 0.12, "uk_23": 0.11, "pk_12": 400000.0, "pk_13": 1600000.0, "pk_23": 1000000.0, "i0": 0.001, "p0": 10000.0, "winding_1": 2, "winding_2": 1, "winding_3": 0, "clock_12": 1, "clock_13": 1, "tap_side": 2, "tap_pos": 2, "tap_min": 1, "tap_max": 3, "tap_nom": 2, "tap_size": 903.0, "id_reference": {"table": "trafo3w", "index": 102}}
42+
{"id": 14, "node_1": 2, "node_2": 4, "node_3": 3, "status_1": 1, "status_2": 1, "status_3": 1, "u1": 20000.0, "u2": 60000.0, "u3": 30100.0, "sn_1": 40000000.0, "sn_2": 100000000.0, "sn_3": 50000000.0, "uk_12": 0.1, "uk_13": 0.12, "uk_23": 0.11, "pk_12": 400000.0, "pk_13": 1600000.0, "pk_23": 1000000.0, "i0": 0.001, "p0": 10000.0, "winding_1": 2, "winding_2": 1, "winding_3": 0, "clock_12": 1, "clock_13": 1, "tap_side": 2, "tap_pos": 2, "tap_min": 1, "tap_max": 3, "tap_nom": 2, "tap_size": 903.0, "id_reference": {"table": "trafo3w", "index": 102}, "pgm_input": {"node_1": 2, "node_2": 4, "node_3": 3}}
4343
],
4444
"link":
4545
[
46-
{"id": 15, "from_node": 0, "to_node": 5, "from_status": 1, "to_status": 1, "id_reference": {"table": "switch", "name": "bus_to_bus", "index": 3021}}
46+
{"id": 15, "from_node": 0, "to_node": 5, "from_status": 1, "to_status": 1, "id_reference": {"table": "switch", "name": "b2b_switches", "index": 3021}, "pgm_input": {"from_node": 0, "to_node": 5}}
4747
],
4848
"asym_load":
4949
[
50-
{"id": 16, "node": 4, "status": 1, "type": 0, "p_specified": [100000.0, 200000.0, 3000000.0], "q_specified": [10000.0, 10000.0, 10000.0], "id_reference": {"table": "asymmetric_load", "index": 33}}
50+
{"id": 16, "node": 4, "status": 1, "type": 0, "p_specified": [100000.0, 200000.0, 3000000.0], "q_specified": [10000.0, 10000.0, 10000.0], "id_reference": {"table": "asymmetric_load", "index": 33}, "pgm_input": {"node": 4}}
5151
],
5252
"asym_gen":
5353
[
54-
{"id": 17, "node": 4, "status": 1, "type": 0, "p_specified": [100000.0, 200000.0, 3000000.0], "q_specified": [10000.0, 10000.0, 10000.0], "id_reference": {"table": "asymmetric_sgen", "index": 32}}
54+
{"id": 17, "node": 4, "status": 1, "type": 0, "p_specified": [100000.0, 200000.0, 3000000.0], "q_specified": [10000.0, 10000.0, 10000.0], "id_reference": {"table": "asymmetric_sgen", "index": 32}, "pgm_input": {"node": 4}}
5555
]
5656
}
Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
11
{
2-
"asym_gen":
3-
[
4-
{"id": 17, "energized": 1, "p": 3300000.0000000005, "q": 30000.000000000004, "i": 32.670416687651056, "s": 3300136.36081905, "pf": 0.9999586802470745, "id_reference": {"table": "asymmetric_sgen", "index": 32}, "node": 4}
5-
],
6-
"asym_load":
7-
[
8-
{"id": 16, "energized": 1, "p": 3300000.0000000005, "q": 30000.000000000004, "i": 32.670416687651056, "s": 3300136.36081905, "pf": 0.9999586802470745, "id_reference": {"table": "asymmetric_load", "index": 33}, "node": 4}
9-
],
10-
"line":
11-
[
12-
{"id": 6, "energized": 1, "loading": 0.5930290459172566, "p_from": -1763554.1135053905, "q_from": -1245081.6865976173, "i_from": 64.0471369590637, "s_from": 2158784.7316401307, "p_to": 1765096.6771171533, "q_to": 1169229.7700732222, "i_to": 62.767063741949805, "s_to": 2117230.39246925, "id_reference": {"table": "line", "index": 101}, "from_node": 2, "to_node": 1}
13-
],
14-
"link":
15-
[
16-
{"id": 15, "energized": 1, "loading": 0.0, "p_from": 0.0, "q_from": -0.0, "i_from": 0.0, "s_from": 0.0, "p_to": 0.0, "q_to": -0.0, "i_to": 0.0, "s_to": 0.0, "id_reference": {"table": "switch", "name": "bus_to_bus", "index": 3021}, "from_node": 0, "to_node": 5}
17-
],
182
"node":
193
[
204
{"id": 0, "energized": 1, "u_pu": 0.9999999996523372, "u": 109999.99996175709, "u_angle": -1.798666001063812e-10, "id_reference": {"table": "bus", "index": 101}},
@@ -24,33 +8,49 @@
248
{"id": 4, "energized": 1, "u_pu": 0.9719979160849105, "u": 58319.87496509463, "u_angle": -1.044828700708015, "id_reference": {"table": "bus", "index": 105}},
259
{"id": 5, "energized": 1, "u_pu": 0.9999999996523372, "u": 109999.99996175709, "u_angle": -1.798666001063812e-10, "id_reference": {"table": "bus", "index": 106}}
2610
],
27-
"shunt":
11+
"line":
2812
[
29-
{"id": 11, "energized": 1, "p": 282008.0001416396, "q": 1551044.0007790178, "i": 31.188122375690188, "s": 1576472.6462886913, "pf": 0.17888543819998318, "id_reference": {"table": "shunt", "index": 1201}, "node": 3}
13+
{"id": 6, "energized": 1, "loading": 0.5930290459172566, "p_from": -1763554.1135053905, "q_from": -1245081.6865976173, "i_from": 64.0471369590637, "s_from": 2158784.7316401307, "p_to": 1765096.6771171533, "q_to": 1169229.7700732222, "i_to": 62.767063741949805, "s_to": 2117230.39246925, "id_reference": {"table": "line", "index": 101}, "pgm_input": {"from_node": 2, "to_node": 1, "i_n": 108.0}}
3014
],
3115
"source":
3216
[
33-
{"id": 7, "energized": 1, "p": 1798666.0004384827, "q": 3476627.872944676, "i": 20.545012571488463, "s": 3914350.6163946516, "pf": 0.4595055928063901, "id_reference": {"table": "ext_grid", "index": 1}, "node": 0}
17+
{"id": 7, "energized": 1, "p": 1798666.0004384827, "q": 3476627.872944676, "i": 20.545012571488463, "s": 3914350.6163946516, "pf": 0.4595055928063901, "id_reference": {"table": "ext_grid", "index": 1}, "pgm_input": {"node": 0}}
3418
],
35-
"sym_gen":
19+
"sym_load":
3620
[
37-
{"id": 13, "energized": 1, "p": 1210000.0, "q": 810000.0, "i": 14.414885714493, "s": 1456090.6565183362, "pf": 0.8309922150680065, "id_reference": {"table": "sgen", "index": 31}, "node": 4}
21+
{"id": 8, "energized": 1, "p": 575000.0, "q": 55200.0, "i": 17.13761141048308, "s": 577643.5232909652, "pf": 0.9954236078405164, "id_reference": {"table": "load", "name": "const_power", "index": 101}, "pgm_input": {"node": 2}},
22+
{"id": 9, "energized": 1, "p": 1207113.6835430216, "q": 115882.91362013007, "i": 35.977469977108086, "s": 1212663.3063904808, "pf": 0.9954236078405161, "id_reference": {"table": "load", "name": "const_impedance", "index": 101}, "pgm_input": {"node": 2}},
23+
{"id": 10, "energized": 1, "p": 632458.9617296124, "q": 60716.06032604279, "i": 18.850149424695108, "s": 635366.6486790245, "pf": 0.9954236078405163, "id_reference": {"table": "load", "name": "const_current", "index": 101}, "pgm_input": {"node": 2}},
24+
{"id": 18, "energized": 1, "p": 99999.99999999999, "q": 99999.99999999999, "i": 1.4000314325372134, "s": 141421.3562373095, "pf": 0.7071067811865475, "id_reference": {"table": "ward", "name": "ward_const_power_load", "index": 34}, "pgm_input": {"node": 4}},
25+
{"id": 19, "energized": 1, "p": 94477.99488734086, "q": 94477.99488734086, "i": 1.3227216252536735, "s": 133612.0617154934, "pf": 0.7071067811865475, "id_reference": {"table": "ward", "name": "ward_const_impedance_load", "index": 34}, "pgm_input": {"node": 4}},
26+
{"id": 20, "energized": 1, "p": 71111.11111111111, "q": 34440.68301069173, "i": 0.7821998773897324, "s": 79012.34567901235, "pf": 0.9, "id_reference": {"table": "motor", "name": "motor_load", "index": 12}, "pgm_input": {"node": 4}}
3827
],
39-
"sym_load":
28+
"shunt":
29+
[
30+
{"id": 11, "energized": 1, "p": 282008.0001416396, "q": 1551044.0007790178, "i": 31.188122375690188, "s": 1576472.6462886913, "pf": 0.17888543819998318, "id_reference": {"table": "shunt", "index": 1201}, "pgm_input": {"node": 3}}
31+
],
32+
"transformer":
33+
[
34+
{"id": 12, "energized": 1, "loading": 0.04892939318768632, "p_from": 1798665.9834270997, "q_from": 3476628.8259518775, "i_from": 20.545016973103277, "s_from": 3914351.4550149054, "p_to": -1765096.6771171836, "q_to": -1169229.7700735242, "i_to": 62.76706374195551, "s_to": 2117230.3924694424, "id_reference": {"table": "trafo", "index": 101}, "pgm_input": {"from_node": 0, "to_node": 1}, "pp_input": {"df": 1.0}}
35+
],
36+
"sym_gen":
4037
[
41-
{"id": 8, "energized": 1, "p": 575000.0, "q": 55200.0, "i": 17.13761141048308, "s": 577643.5232909652, "pf": 0.9954236078405164, "id_reference": {"table": "load", "name": "const_power", "index": 101}, "node": 2},
42-
{"id": 9, "energized": 1, "p": 1207113.6835430216, "q": 115882.91362013007, "i": 35.977469977108086, "s": 1212663.3063904808, "pf": 0.9954236078405161, "id_reference": {"table": "load", "name": "const_impedance", "index": 101}, "node": 2},
43-
{"id": 10, "energized": 1, "p": 632458.9617296124, "q": 60716.06032604279, "i": 18.850149424695108, "s": 635366.6486790245, "pf": 0.9954236078405163, "id_reference": {"table": "load", "name": "const_current", "index": 101}, "node": 2},
44-
{"id": 18, "energized": 1, "p": 99999.99999999999, "q": 99999.99999999999, "i": 1.4000314325372134, "s": 141421.3562373095, "pf": 0.7071067811865475, "id_reference": {"table": "ward", "name": "ward_const_power_load", "index": 34}, "node": 4},
45-
{"id": 19, "energized": 1, "p": 94477.99488734086, "q": 94477.99488734086, "i": 1.3227216252536735, "s": 133612.0617154934, "pf": 0.7071067811865475, "id_reference": {"table": "ward", "name": "ward_const_impedance_load", "index": 34}, "node": 4},
46-
{"id": 20, "energized": 1, "p": 71111.11111111111, "q": 34440.68301069173, "i": 0.7821998773897324, "s": 79012.34567901235, "pf": 0.9, "id_reference": {"table": "motor", "name": "motor_load", "index": 12}, "node": 4}
38+
{"id": 13, "energized": 1, "p": 1210000.0, "q": 810000.0, "i": 14.414885714493, "s": 1456090.6565183362, "pf": 0.8309922150680065, "id_reference": {"table": "sgen", "index": 31}, "pgm_input": {"node": 4}}
4739
],
4840
"three_winding_transformer":
4941
[
50-
{"id": 14, "energized": 1, "loading": 0.03152945292576947, "p_1": -651018.5317680555, "q_1": 1013282.7126517809, "i_1": 35.73216058618558, "s_1": 1204394.8623538653, "p_2": 944410.894001629, "q_2": 581081.3221020879, "i_2": 10.977386752839678, "s_2": 1108858.6202058704, "p_3": -282008.00014178595, "q_3": -1551044.0007787698, "i_3": 31.18812237568588, "s_3": 1576472.6462884734, "id_reference": {"table": "trafo3w", "index": 102}, "node_1": 2, "node_2": 4, "node_3": 3}
42+
{"id": 14, "energized": 1, "loading": 0.03152945292576947, "p_1": -651018.5317680555, "q_1": 1013282.7126517809, "i_1": 35.73216058618558, "s_1": 1204394.8623538653, "p_2": 944410.894001629, "q_2": 581081.3221020879, "i_2": 10.977386752839678, "s_2": 1108858.6202058704, "p_3": -282008.00014178595, "q_3": -1551044.0007787698, "i_3": 31.18812237568588, "s_3": 1576472.6462884734, "id_reference": {"table": "trafo3w", "index": 102}, "pgm_input": {"node_1": 2, "node_2": 4, "node_3": 3}}
5143
],
52-
"transformer":
44+
"link":
45+
[
46+
{"id": 15, "energized": 1, "loading": 0.0, "p_from": 0.0, "q_from": -0.0, "i_from": 0.0, "s_from": 0.0, "p_to": 0.0, "q_to": -0.0, "i_to": 0.0, "s_to": 0.0, "id_reference": {"table": "switch", "name": "b2b_switches", "index": 3021}, "pgm_input": {"from_node": 0, "to_node": 5}}
47+
],
48+
"asym_load":
49+
[
50+
{"id": 16, "energized": 1, "p": 3300000.0000000005, "q": 30000.000000000004, "i": 32.670416687651056, "s": 3300136.36081905, "pf": 0.9999586802470745, "id_reference": {"table": "asymmetric_load", "index": 33}, "pgm_input": {"node": 4}}
51+
],
52+
"asym_gen":
5353
[
54-
{"id": 12, "energized": 1, "loading": 0.04892939318768632, "p_from": 1798665.9834270997, "q_from": 3476628.8259518775, "i_from": 20.545016973103277, "s_from": 3914351.4550149054, "p_to": -1765096.6771171836, "q_to": -1169229.7700735242, "i_to": 62.76706374195551, "s_to": 2117230.3924694424, "id_reference": {"table": "trafo", "index": 101}, "from_node": 0, "to_node": 1}
54+
{"id": 17, "energized": 1, "p": 3300000.0000000005, "q": 30000.000000000004, "i": 32.670416687651056, "s": 3300136.36081905, "pf": 0.9999586802470745, "id_reference": {"table": "asymmetric_sgen", "index": 32}, "pgm_input": {"node": 4}}
5555
]
5656
}

0 commit comments

Comments
 (0)