Skip to content
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

[feature] Expose sensitivity measures such as PTDF #2290

Open
5 of 7 tasks
leuchtum opened this issue May 23, 2024 · 8 comments
Open
5 of 7 tasks

[feature] Expose sensitivity measures such as PTDF #2290

leuchtum opened this issue May 23, 2024 · 8 comments
Labels
enhancement New feature or request feature

Comments

@leuchtum
Copy link

Feature Checklist

Feature Type

  • Adding new functionality to pandapower

  • Changing existing functionality in pandapower

  • Removing existing functionality in pandapower

Problem Description

Sensitivity measures such as the power transfer distribution factors (PTDF) are part of modern power network analytics. They are commonly used in market analytics, congestion management, stability analysis and more. Currently the PTDFs are calculated by pypower.makePTDF and therefore _pd2ppc needs to be used by the user. This is error prone, as one needs to deal with indices and more.

Feature Description

I suggest to expose the calculation of sensitivity measures directly, something like pp.ptdf(net). There has already been interest in this feature, as #847, #1419, #1572 and #1622 have shown.

Additional Context

No response

Label

  • Relevant labels are selected
@vogt31337
Copy link
Contributor

Sounds like an interesting topic, could you provide more information on this topic? I have until now never used ptdf and maybe could you estimate how complex implementing this behaviour is? Or trace a bit more what needs to be changed?

@vogt31337 vogt31337 added feature enhancement New feature or request labels Jul 26, 2024
@vogt31337
Copy link
Contributor

@leuchtum, could you provide more insight?

@leuchtum
Copy link
Author

@vogt31337 Sorry for not answering a month, I've been involved in other projects away from our power-network-modeling-world. However, I can foresee that I will be more active on the topic (especially PTDF's) again as from September. Would it be ok if we leave the issue open until then and I'll get back to you when I'm deeper into the topic again?

@vogt31337
Copy link
Contributor

No Problem. I find this an interesting topic and used a brute force approach for calculating sensitivities. That's why i asked. See you in September.

@leuchtum
Copy link
Author

Also mentioned in #833 (comment)

@AnkurArohi
Copy link

This is a good feature to have, currently the function needs _pd2ppc with branches and nodes, this is very problematic because one has to match the indices , as already mentioned above, Now when one gets the results again one needs to interpret back to the actual pandapwoer network elements.

Basically, what is suggested here is to be able to provide instead of pd2ppc branches and nodes, simply pandapower lines, trafos, trafo3w, switches etc and busses, now the conversion of these to pypower pd2ppc should be mart of makePTDF func, this is simple in pandapower as there are already such functions to map the pandapower to pypower pd2ppc

@leuchtum
Copy link
Author

@AnkurArohi exactly.

However, you could consider thinking a little bigger and creating a kind of submodule for sensitivity analyses in general, because PTDF matrices, for example, are only one part of the possible sensitivity analyses.

Even with the PTDF matrices themselves, there are various possibilities. The current function makePTDF uses a DC approximation, but there are many approaches to developing a PTDF matrix around an AC solution. Both have advantages and disadvantages. In this context, it is worth to read the paper by Baldick et al (Here they write about incremental PTDFs (=AC-PTDFs) and DC PTDFs): https://ieeexplore.ieee.org/document/1489123

@AnkurArohi what is your way of calculating a PTDF Matrix right now? Can you give an example? I want to start to collect a bit of examples to see where we are going with this.

@AnkurArohi
Copy link

AnkurArohi commented Aug 28, 2024

@leuchtum
Nein, The thing is if you have the power flow algorithm and you can run it as and when you like, then actually there is no need of increments to calculate "better" AC-PTDF matrices. For AC sensitivity analysis we should be able to extract the Jacobian Matrix (just before the power flow in pypower).

Here we are concerned currenlty only with the DC Approximated PTDF.

My way of calculating the PTDF matrix is to provide the function with pd2ppc branches and nodes, then interpret (map) the results back to pandapower elements.

To summarize we need

  1. make_PTDF func which can accept pandapower elements and returns pandapwoer elements sens
  2. AC sens analysis should be possible through the use of jacobian matrix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
None yet
Development

No branches or pull requests

3 participants