Change compute_ac_pf iteration to use more standard (smaller) Jacobian - #1011
Draft
LKuhrmann wants to merge 7 commits into
Draft
Change compute_ac_pf iteration to use more standard (smaller) Jacobian#1011LKuhrmann wants to merge 7 commits into
LKuhrmann wants to merge 7 commits into
Conversation
…ian" This reverts commit 85adefb.
Broke due to consequence of not iterating to find p and q injections anymore and instead calculating them in f!
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1011 +/- ##
=======================================
Coverage 93.94% 93.94%
=======================================
Files 43 43
Lines 9676 9731 +55
=======================================
+ Hits 9090 9142 +52
- Misses 586 589 +3
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Contributor
Author
|
Seems like the remaining failing tests would be fixed by #1010 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
Fixes #1009.
Reduces what is iterated in the Newton Raphson iteration from [P, Q] for all buses to [P, Q] for PQ buses and [P] for PV buses. This reduces the Jacobian size by the number of PV busses +2.
I believe the implementation I am suggesting is more standard. The first two random results I get when I google for "newton raphson power flow" support this: random university pdf 1, page 111ff and random university pdf 2, page 9
Impact
Should make
compute_ac_pfslightly faster and more memory efficient with more standard convergence when compared to other power flow tools.As this PR simplifies the Newton-Raphson iteration by no longer converging toward Q injections (for PV and slack buses) and P injection (for the slack bus) I would expect this to converge whenever the current implementation converges.
But I can't prove that, so there is a risk that this might break convergence in some (probably a bit weird) cases.
Todo
I assume this change will need some tests. One test that could be added is the one presented in #1009 that does not currently converge.
I am uncertain if the way I implemented this is inline with the broader PowerModels codebase, so I am keen for code changes/opinions!
What else would need to happen so this can be merged?
If there are reasons for the current power flow implementation I am keen to hear them!