-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Background
In #914 and #1024 we have implemented the observability check in radial grid with phasor voltage measurement. However, the mathematical workout is not correct. We assumed that the phasor voltage sensor can be arbitrarily assigned to a branch, just as an injection measurement. This assumption does not hold.
Rationale
We should not assign phasor voltage sensor to any branches. Instead, we should solely rely on branch and injection sensor to connect the graph. After trying to make maximum connected graph, we check if the graph is fully connected. If yes, there should be at least one voltage sensor (phasor or not) for the grid to be observable. If no, each island should have at least one voltage phasor sensor for the grid to be observable.
Mathematical work-out
Graph
We still use the DFS graph built by the topology and YBus. The vertex order is in the reverse order of the DFS search.
During the vertex traversal, we try to propagate the availability of voltage phasor sensor in the current sub-graph. When we want to steal the upstream injection sensor to connect the graph, we choose not to steal it if the current leaf sub-graph already has voltage phasor sensor. In this way, the upstream injection sensor can be reserved for another leaf sub-graph.
Check observability
Initialization
Voltage phasor sensor
As proposed in #914, we have a separate vertex array for phasor voltage sensor.
- Set the vertices with phasor voltage sensor to
phasor_voltage_sensor_availableand other vertices tophasor_voltage_sensor_unavailable. - If there is no phasor voltage sensor at all, set the first vertex which has voltage magnitude sensor to
phasor_voltage_sensor_available.
Flow sensor
For flow sensor we re-use the YBusStructure as data array to set injection sensor and branch sensor. Note we need to do bi-directional traversal, but we still set only the upper triangle of the matrix. When we do downstream edges search, we use the transpose lookup to find the relevant information about measured or not_measured.
Graph search
We traverse the vertices of the above grid in the reverse order of the DFS results. For each vertex, we do the following:
- If the predecessor edge is
not_measured.- If the current vertex has
injection_available- change the predecessor edge to
measured. - change the current vertex to
injection_unavailable.
- change the predecessor edge to
- Else if the predecessor vertex has
injection_availableAND current vertex hasphasor_voltage_sensor_unavailable. The second condition prevents the upstream vertex's injection gets claimed by an already phasor voltage reachable leaf sub-graph.- change the predecessor edge to
measured. - change the predecessor vertex to
injection_unavailable.
- change the predecessor edge to
- If the current vertex has
- Change the current vertex to
injection_unavailable, regardless of the original state. - If the predecessor edge is
measuredand current vertex hasphasor_voltage_sensor_available.- change predecessor vertex to
phasor_voltage_sensor_available, this propagates the phasor voltage reachability.
- change predecessor vertex to
Now we do a forward DFS traverse to spread the phasor voltage reachability to downstream leaves. This means a reverse loop from YBus order. For each vertex, we do the following:
- If the current vertex has
phasor_voltage_sensor_available. We loop all its downstream edges and vertices. For each downstream edge and vertex, we do:- If the downstream edge has
measured. Note we are now in the lower triangle of the data array which is always ignored. You need to look at its transpose position.- change downstream vertex to
phasor_voltage_sensor_available.
- change downstream vertex to
- If the downstream edge has
After forward DFS traverse, we check if all the vertices have phasor_voltage_sensor_available. If yes, the system is observable. If no, the system is not observable.
NOTE: the system without phasor voltage sensor is covered by artificially change one vertex with voltage magnitude sensor to voltage phasor sensor.