Repository navigation
Branch switching events for applications - #610
Conversation
1df5bb8 to
959899f
Compare
959899f to
3cb2a38
Compare
pelesh
left a comment
There was a problem hiding this comment.
Great work!
There is one major item that needs to be addressed and that is to identify cases when taking line out of service makes underlying linear system singular. That needs to be clearly identified in this PR, so that a remedy can be implemented subsequently.
My guess is that islanding would be one such instance. This can be easily checked with ten-gen example. There may be other instances where zeroing out branch Jacobian stamp may lead to singular system Jacobian.
@abirchfield and @shakedregev: please chime in.
The rest are nitpicking suggestions.
|
Addressed! |
d24aae9 to
f48c538
Compare
|
@pelesh Four examples added of some trivial and non trivial examples that we may feasibly run into, in |
| success *= isEqual(bus.Ir(), ScalarT{0.0}); | ||
| success *= isEqual(bus.Ii(), ScalarT{0.0}); | ||
|
|
||
| // Both voltage variables remain, but their KCL rows are identically zero. |
There was a problem hiding this comment.
Where do you set the diagonal on the removed rows to 1?
There was a problem hiding this comment.
This implementation does not do such, because its not clear how to determine when that should be done (algo for algebraic connectivity, which we could implement but it would certainly be flaky)
There was a problem hiding this comment.
If a row + column is all 0s, set diagonal to 1. So how are you dealing with this?
There was a problem hiding this comment.
That is not the only path to singular Jacobian, for example: (Branch/README.md)
And an edge case that is feasible but not probable:
Applications like MATPOWER or PSSE have island-detection but that is not a catch-all. The goal is to be able to catch/detect these scenarios and communicate an expected failure to converge. Any assistance appreciated
There was a problem hiding this comment.
Are the matrices symmetric? If they are, then any symmetric matrix has what's known as an LBL^T factorization. L is lower triangular and B has 1X1 or 2x2 blocks on the diagonal. If any of those blocks are singular, the matrix is singular.
What does red convey? A removed element?
There was a problem hiding this comment.
No unfortunately because of the tap&phase shifting transformer model the admittance matrix is not guaranteed to be Hermitian
And yes red was my attempt to indicate "this element has just been removed"
There was a problem hiding this comment.
If you just want to flag a problematic system, you can use rank revealing LU (I think KLU does this). If you factorize to L*U, by convention L has a diagonal of 1s. So you will get some 0s on the diagonals of U, say in place
There was a problem hiding this comment.
If all examples fall into 0s on the diagonal, or singular 2X2 blocks, you can simply check for these. You can fix the first by setting the diagonal to 1. For the 2X2, I think it depends on the domain knowledge of what this actually means, but maybe setting the off diagonals to 0 is sufficient.
pelesh
left a comment
There was a problem hiding this comment.
I think this can be merged as preliminary capability to take branches out of service. Follow up work should include:
- Better documentation and more examples on possible singular systems when a branch is taken out of service.
- Ability to access branches through a unique ID at O(1) complexity (see #370).
- Remediation of singular systems.
This branch needs rebasing before merging.
Co-authored-by: pelesh <peless@ornl.gov>
Co-authored-by: pelesh <peless@ornl.gov>
Co-authored-by: pelesh <peless@ornl.gov>
0496367 to
e747476
Compare
Co-authored-by: pelesh <peless@ornl.gov>
|
Rebased! I think its ready. |
Description
Adds solver events that take a branch in and out of service. Part 1 of #606, modern attempt of #391. This
Branchmodel is designed specifically forContingencyAnalysis, as introducing breaker and relay raises the same problem we faced withBusFault. Next PR will be a smooth breaker and relay.@pelesh
(+ Added worked out examples with diagrams to demonstrate topology scenarios that may be encountered and how that impacts the Jacobian)
Proposed changes
Branch::setEnabled(bool), Implemented using an admittance mask on the branch equations.SystemModel::getComponent(id)looks up a branch by its case-fileid.enable/disabletake adeviceid and are handled like fault events.DynamicSimulation/Toy/ThreeBusBasic:BR_1_2opens at 1 s and recloses at 5 s.BranchTests::singularJacobian(pattern kept, values zero)Checklist
-Wall -Wpedantic -Wconversion -Wextra.Further comments
Repsonse