NREL-Sienna / PowerSystems.jl

Data structures in Julia to enable power systems analysis. Part of the Scalable Integrated Infrastructure Planning Initiative at the National Renewable Energy Lab.
https://www.nrel.gov/analysis/sienna.html
BSD 3-Clause "New" or "Revised" License
306 stars 74 forks source link

PowerModels Parser Overzealously Updates Bus Type #1175

Open GabrielKS opened 1 month ago

GabrielKS commented 1 month ago

PowerSystems allows generators to be connected to PQ buses. So does the PSS/E data format, as far as I can tell. However, when PowerSystems parses such a thing from a PSS/E file, it converts the bus to PV: https://github.com/NREL-Sienna/PowerSystems.jl/blob/c932c0b6bef52b911c5aedb1740a35fb620dae6e/src/parsers/pm_io/data.jl#L1698

Though probably intended as a data cleaning measure (quoth @claytonpbarrows), this strikes me as a bug as it leads to a Sienna system that does not correspond to the valid PSS/E system to the extent possible.

Note that the opposite case, which we also implement — converting a PV bus to PQ if there are no generators connected — is less problematic: the PSS/E spec states that PV buses must have at least one corresponding generator record, so PV buses without generators are invalid and we are free to do whatever we want with them.

I commented out the offending lines of data.jl and the PSY tests still passed, but I'd love to hear from others on the best thing to do here. Here's a minimal PSS/E RAW file that reproduces the issue (bus 1434):

0, 100.0, 33, 0, 1, 60.0
basic_2024
PSS/E 33.3 RAW via PowerFlows.jl, 2024-08-13T15:36:56.175
1434, 'B1434_S', 20.0, 1, 1, 10, , 1.0131474402609133, 21.436317553216863, 1.1, 0.9
4242, 'B4242_ND', 20.0, 3, 2, 2, , 1.02, 0.0, 1.1, 0.9
0
0
0
1434, 'OP', 520.0000000000001, 0.0, 3600.0, -3600.0, 1.0131474402609133, , 638.0, , , , , , 1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Q
jd-lara commented 1 month ago

@GabrielKS see this issue for reference on this topic https://github.com/lanl-ansi/PowerModels.jl/pull/797