-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Doc not up to date + behaviour mismatch on ieee cases between pp3 and pp2 #2557
Comments
@BDonnot thanks for bringing this up. Could you by any chance add the version of lightsim2grid you were using? Since ls2g needed to be patched to be fully compatible. |
Yes of course, lightsim2grid is 0.10.2 as shown in the last paragraph :-) What bothers me here is that the ieee 118 leads to different results (flows and voltages) depending on pandapower version. I am not sure this is desirable. Also, if you have a script that convert the "old" grid to the new grid then i'd be happy to have it. Because we stored lots of grid in pandapower format for the l2rpn competitions / grid2op eco system and I can't convert them unfortunately :-( |
Hi @BDonnot,
... which gives me these results: ![]() Detailed answer: We thought, why is there even a negative As we changed all of this, we got failing tests in the
and apparently we changed only the test files there and not the json files used by pandapower.networks.caseXYZ()
We are currently working on the re-conversion of matpower files via @BDonnot please remember some trafos will be handled as impedances as pointed out by Roman here: Grid2op/lightsim2grid#88 ... I guess the issue here is also related to your answer As a quick fix in grid2op, you can multiply the Summary of To-Do's:
BR Pawel |
P.S. Although the Z and Y mismatches are better than before, the Y mismatch is still off, can't figure out why right now... will need to comparte the
I am also attaching the ppc_branch_pp2.csv Maybe this helps... |
Hello @pawellytaev Thanks a lot for the fix, I will see if fixing it at import will solve (at least for the short term) my issue on old pandapower grid. You also write:
I think this is the right thing to do. And, if I may, I posted an "issue" a few months ago (see #2131). If you are to reconvert them again, from a user perspective, it would be better if the default grid matches the expected results with the default values of pp.runpp.
This bothered me also back in 2020. I was trying to match the results of pandapower in lightsim2grid. I could not explain this piece of code but implemented finally in lightsim2grid without understanding it.
Yes I remember that, but without any input grid and proper working example I cannot improve lightsim2grid with it :-/ It should not be that hard to do honestly. The hardest part is always "what to do exactly" (devil is in the details, here specifically in the "exactly")
Yes I will do that when using the "PandaPowerBackend" and pandapower version 3 or above. When fixed, I will only do this if the "bug" is still present. Thanks a lot :-) |
Bug report checklis
Searched the issues page for similar reports
Read the relevant sections of the documentation
Browse the tutorials and tests for usefull code snippets and examples of use
Reproduced the issue after updating with
pip install --upgrade pandapower
(orgit pull
)Tried basic troubleshooting (if a bug/error) like restarting the interpreter and checking the pythonpath
Reproducible Example
Issue Description and Traceback
Here What I am doing:
I create two virtual environment with exactly the same packages except for pandapower. In one of the venv pandapower is 2.14.11 and in the other it's 3.0.0, exact details here:
requirements_pp2.txt
requirements_pp3.txt
Then I run the above code which will:
and then I compare 6 things:
a) the "z" parameters of the trafo model in the doc (implementation in the script)
b) the "z" parameters of the trafo model, as computed directly by pandapower (looking at the _ppc["branch"])
c) the "z" parameters of the trafo model as computed by lightsim2grid
d->f) I do the same for the y parameter of the trafo model.
Expected Behavior
I am expecting that:
I. documentation (especially of trafo, see here https://pandapower.readthedocs.io/en/latest/elements/trafo.html) details what is implemented in the code. This is not the case for both pandapower 2 and pandapower 3.
II. the computed parameters for ieee grids does not change between pandapower versions.
For point I
I got, for pandapower 2:
Mismatch with the doc (z): 0.002986873550935059
Mismatch with the doc (y): 0.8196779804309017
This means that the maximum different for (my own) understanding of the doc leads to a maximum difference value of 0.003 for the z component and 0.8 for the y component (everything is per unit here)
And for pandapower 3:
Mismatch with the doc (z): 0.0017865851613352059
Mismatch with the doc (y): 0.7969200083782807
For the y part, I think the doc is missing a "multiplication by 100." somewhere, but I don't really know where. And also I cannot manage (despite some deep understanding of powerflow) to match the exact behaviour of pandapower by reading the doc (without reverse engineering the code)
For point II
I use the implementation of lightsim2grid to compare the trafo parameters obtained by pandapower 2 and pandapower 3. I do this because 1) lightsim2grid fully match pandapower 2 up to numerical precision, se bellow) and 2) lightsim2grid version is the same on both virtual envs (not affected by the change in pandapower).
For pandapower 2 I obtain:
Mismatch lightsim (z): 6.938893903907228e-18
Mismatch with lightsim (y): 2.2215302514227986e-16
So as you can see, errors are neglectible and pandapower and lightsim2grid are perfectly aligned and understand the same way the "ieee grid".
For pandapower 3 I get:
Mismatch lightsim (z): 0.0012002883895998497
Mismatch with lightsim (y): 1.6165979888091822
And here you see quite drastic changes, especially in the "y" part which lead to some impactful changes in the output flow and voltages.
Despite taking few hours (on multiple days) to try to "fix" this, i did not manage to "align" pandapower 2 and pandapower 3. This might be related to issue #2532
Installed Versions
With two changes (because I compare 2 venvs):
Label
The text was updated successfully, but these errors were encountered: