Repository navigation
Conversation
Signed-off-by: jhe <JialinHe_Plusero@outlook.com>
Signed-off-by: jhe <JialinHe_Plusero@outlook.com>
Signed-off-by: jhe <JialinHe_Plusero@outlook.com>
Signed-off-by: jhe <JialinHe_Plusero@outlook.com>
Copilot stopped work on behalf of
Plusero due to an error
November 12, 2026 09:18
indirect includes and reference members Signed-off-by: jhe <JialinHe_Plusero@outlook.com>
Plusero
marked this pull request as ready for review
November 12, 2026 13:07
|
Plusero
marked this pull request as draft
November 16, 2026 10:58
Contributor
Author
|
Converted to draft. I am now reviewing it with agents on specific aspects like security, memory, etc. |
This branch has not been deployed
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.



Add voltage variances for state estimation
Changes proposed in this PR
State estimation can now report the uncertainty of the voltage magnitude and voltage angle at requested buses, for Iterative-linear State Estimation (ILSE) and Newton-raphson State Estimation (NRSE), in both symmetric and asymmetric calculations.
The main changes are:
docs/algorithms/state-estimation-uncertainty.mdcontains the detailed motivation and mathematical derivations.The interface is internal for now:
run_state_estimationinmath_solver/math_solver.hppgets an optionalStateEstimationUQContext*, defined inmath_solver/state_estimation_uq.hpp, that defaults tonullptr. C API and the Python API are unchanged.There will be follow-up PRs:
How it works
The workflow
The flow chart below describes the workflow:
flowchart TD start(["Call with an<br>uncertainty<br>request"]) valid{"Requested bus<br>indices valid?"} reject(["Reject the<br>request"]) estimate["Run state<br>estimation<br>as usual"] requested{"Request<br>non-empty?"} plain(["Return the<br>estimate only"]) done(["Return the<br>estimate and<br>uncertainty"]) start --> valid valid -- no --> reject valid -- yes --> estimate estimate --> requested requested -- no --> plain requested -- yes --> estimator subgraph uq["Uncertainty calculation"] estimator{"Estimator?"} ilse["Copy the<br>existing<br>LU factors"] nrse["Assemble the<br>matrix again<br>and factorize"] factors{"LU factors<br>without pivot<br>perturbation?"} angle{"Voltage angle<br>measured?"} slack["Extra solve:<br>covariance<br>with slack bus"] inverse["Selective<br>inverse on the<br>LU pattern"] variance["Magnitude and<br>angle variance<br>per bus"] invalid["Mark requested<br>values invalid"] estimator -- ILSE --> ilse estimator -- NRSE --> nrse ilse --> factors nrse --> factors factors -- yes --> angle factors -- no --> invalid angle -- no --> slack angle -- yes --> inverse slack --> inverse inverse --> variance end variance --> done invalid --> doneThe theory
The page
docs/algorithms/state-estimation-uncertainty.mdcontains the detailed mathematical derivations.In short: