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] Check for necessary and sufficient condition for observability in radial grid #838

Open
TonyXiang8787 opened this issue Nov 21, 2024 · 0 comments · May be fixed by #858
Open

[FEATURE] Check for necessary and sufficient condition for observability in radial grid #838

TonyXiang8787 opened this issue Nov 21, 2024 · 0 comments · May be fixed by #858
Labels
feature New feature or request

Comments

@TonyXiang8787
Copy link
Member

TonyXiang8787 commented Nov 21, 2024

Background

The full observability check for any grids and any sensors is described in #84, it is still a complicated task. In #508 we have implemented a simple necessary condition check so we can throw NotObservableError if we are sure there is not enough measurements.

The feature in #508 have greatly helped the real-time state estimation to give clear errors. However, there are still plenty of scenarios where the number of measurements seems to be sufficient, but they are not independent. It still results in SparseMatrixError.

Proposal

We are still far from implementing the full observability check as in #84. This issue proposes to do another intermediate step to implement the full necessary and sufficient condition check if the data satisfy the following conditions:

  1. The grid is in radial structure without cycles. Parrallel branches do not count as cycles.
  2. There is no voltage phasor (and also no current phasor) measurements.

In this case, implementing a full necessary and sufficient condition check is relatively easy.

Mathematics

See below the mathematical workout of proposal.

Build graph

  1. Build an undirected graph with vertices (bus) and edges (branch). Parallel branches will be merged into one edge.
  2. Since the graph is radial and there is no parallel edges. We strictly have n_edges = n_vertices - 1.
  3. Label all the vertices with either injection_available or injection_unavailable.
  4. Lable all the edges with either measured (if there is at least one power sensor in one of the parallel branches), or not_measured.
  5. Perform a DFS search from the source vertex. For each vertex, record the predecessor vertex, and predecessor edge.

Check observability

Now we can check the observability. To do that, we traverse the vertices in the reverse order of the DFS results. For each vertex, we do the following:

  1. If the predecessor edge is not_measured .
    1. If the current vertex has injection_available
      1. change the predecessor edge to measured.
    2. Else
      1. If the predecessor vertex has injection_available
        1. change the predecessor edge to measured.
        2. change the predecessor vertex to injection_unavailable.
  2. Change the current vertex to injection_unavailable, regardless of the original state.

After traversal to all the vertices in reverse order, check if all the edges are now measured. If yes, the system is observable, otherwise it is not observable. This is a full necessary and sufficient condition check.

Implementation

It seems that we need to build another graph to implement the proposed method. However, all the information is already in the YBusStructure. If the grid is radial, in the topological processing the DFS search is already done, and the vertices are already ordered in reverse of DFS result. The upper triangle of the YBusStructure contains all the information of the predecessor vertex and predecessor edge.

So the implementation proposal will be

  1. In MathModelTopology add a member called is_radial. This is easy to set in the topological processing.
  2. In the observability check, pass the YBusStructure into the check function, and perform the graph check as above.

The figure below shows a simple graph and its YBusStructure. In the upper triangle, there should be only one off-diagonal entry which is the predecessor vertex and predecessor edge.

IMG_6970

@TonyXiang8787 TonyXiang8787 added the feature New feature or request label Nov 21, 2024
@TonyXiang8787 TonyXiang8787 moved this to Q4 2024 in Power Grid Model Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
Status: Q4 2024
1 participant