power-grid-model icon indicating copy to clipboard operation
power-grid-model copied to clipboard

[FEATURE] Addition of phasor voltage sensors to the necessary and sufficient conditions for observability in radial grids

Open figueroa1395 opened this issue 11 months ago • 0 comments

Background

The full observability check for any grid (radial or meshed) with any type of sensors is described in #84. In #508, we implemented a necessary condition check for observability, which was later extended in #838 to a necessary and sufficient condition for observability in radial grids. However, the checks implemented in #508 and #838 have not yet been extended to meshed grids. Additionally, they only consider regular voltage sensors and do not account for phasor voltage sensors.

Proposal

This issue focuses solely on incorporating phasor voltage sensors into the necessary and sufficient condition check for observability in radial grids, extending #838 and serving as an additional intermediate step toward the full observability check described in #84.

Mathematics

Build graph

We don't need to build any additional graph. The one used in #858 is enough to perform the observability check. Accounting for phasor voltage sensors doesn't modify the graph, but adds a new tag in the already constructed vertex, similarly to what the injection sensors did in #858. Details are explained in the next section.

Check observability

To check observability, we traverse the vertices of the above grid 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. change the current vertex to injection_unavailable.
    2. Else if the predecessor vertex has injection_available
      1. change the predecessor edge to measured.
      2. change the predecessor vertex to injection_unavailable.
    3. Else if the current vertex has phasor_voltage_sensor_available
      1. change the predecessor edge to measured.
      2. change the current vertex to phasor_voltage_sensor_unavailable.
    4. Else if the predecessor vertex has phasor_voltage_sensor_available
      1. change the predecessor edge to measured.
      2. change the predecessor vertex to phasor_voltage_sensor_unavailable.
  2. Change the current vertex to injection_unavailable, regardless of the original state.

Note: phasor_voltage_sensor_available is the new separate vertex tag introduced by the addition of phasor voltage sensors.

After traversing all the vertices in reverse order, do the following:

  1. If all the edges are now measured

    1. If at least one phasor voltage sensor is present
      1. if there is at least one vertex with phasor_voltage_sensor_available
        1. the system is observable.
      2. Else
        1. the system is NOT observable.
    2. Else if at least one voltage sensor is present
      1. the system is observable.
    3. Else
      1. the system is NOT observable.
  2. Else

    1. the system is NOT observable.

This is the full necessary and sufficient condition check for radial grids considering phasor voltage sensors.

Note: The same order layed out in the logic, is not necessarily the most efficient order for the implementation details.

Implementation

The implementation follows directly from #868. The DFS search information is already contained and ordered in the YBusStructure; its upper triangle contains all the information on the predecessor vertex and edge. In addition, the measured_values in the already implemented necessary_observability_check also contain the information of the phasor voltage sensors.

In short, the implementation proposal is as follows:

  1. Add the new phasor_voltage_sensor_available tag to all the vertexes in the graph. This can probably be done by generalizing/extending the count_flow_sensors function to add the new sensors.
  2. Since each vertex can potentially have two sensors now, move either one to different branches if needed. This can probably be done by generalizing/extending the assign_injection_sensor_radial function to move available phasor voltage sensors to unmeasured branches.
  3. This is enough for the sufficient observability condition, as the necessary condition is already implemented, even for phasor voltage sensors.

Note: Everything can be implemented directly inside observability.hpp

figueroa1395 avatar Mar 05 '25 11:03 figueroa1395