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] Ability to replace a branch measurement with an injection measurement (And subsequent changes to the grid) #26

Open
nitbharambe opened this issue Jan 31, 2025 · 3 comments
Labels
feature New feature or request

Comments

@nitbharambe
Copy link
Member

nitbharambe commented Jan 31, 2025

While running State Estimation, many times its required to collapse a section of the grid to a smaller grids with less components because we might not have complete observability of the subsection from measurements perspective. This is useful when we have a detailed form of grid data but we only have requirement to run estimation for upstream nodes. PGM DS can thus provide a safe way to implement this.

@IrenaDk / @francisca-mestre, this might be useful for you.

For eg:

source -- node --- line ----(>measurement)- node ---- (some big grid)

can be converted to

source -- node --- line --- node ---(>measurement)-- load

There would be more features required to implement this. The end goal is described here.

@nitbharambe nitbharambe added the feature New feature or request label Jan 31, 2025
@nitbharambe nitbharambe changed the title [FEATURE] Ability to replace a branch measurement with an injection measurement [FEATURE] Ability to replace a branch measurement with an injection measurement (And subsequent changes to the grid) Jan 31, 2025
@jaapschoutenalliander
Copy link
Contributor

jaapschoutenalliander commented Feb 3, 2025

Thank you for the feature idea. How would you propose collapsing the subgrid loads, summing all loads in the subgrid, grouped by types?

On implementation, we have a function to get all downstream nodes from the cut-off already:

def get_downstream_nodes(self, node_id: int, inclusive: bool = False):
"""Get the downstream nodes from a node.
Example:
given this graph: [1] - [2] - [3] - [4], with 1 being a substation node
>>> graph.get_downstream_nodes(2) == [3, 4]
>>> graph.get_downstream_nodes(3) == [4]
>>> graph.get_downstream_nodes(3, inclusive=True) == [3, 4]
Args:
node_id(int): The id of the node to get the downstream nodes from.
inclusive(bool): Whether to include the input node in the result.
Raises:
NotImplementedError: If the input node is a substation node.
Returns:
list[int]: The downstream nodes.
"""

If you would add this I would prefer setting up a helper function section instead of adding it as a function to the grid itself. To keep it focussed on basic grid interaction and modification

@nitbharambe
Copy link
Member Author

nitbharambe commented Feb 7, 2025

In state estimation, we do not need to sum up loads. We are essentially "ignoring" the (some big grid) in state estimation calculation. Its contribution gets counted by that measurement.
By doing this modification, we would not get results of voltages / power flows in the (some big grid), which would be okay for most analysis.

The strategy about this would be following (Easier than mentioned in the description):

  • Request the "branch_id" and "side of grid to keep" and "side of grid to discard" from user. The "side of grid to keep" would mostly be the source side (But we request it in case there are multiple sources)
  • Remove all components connected to the discard side node of the branch (except the branch) and add an empty artificial load, p/q_specified=0 .

This doesnt address a meshed grid though, so more thought is needed here.

Also, helper function would do!

@jaapschoutenalliander
Copy link
Contributor

Thanks for the clarification. So my strategy would be to

  1. Determine the downstream nodes using the existing function. This indeed is only possible for radial grids. (We also provide functions to check this
    def find_fundamental_cycles(self) -> list[list[int]]:
    )
  2. Filter the downstream nodes in the interface from Grid -> PGM, this means you do not have to alter the grid itself.

How would you like to procede? Is this something you can draft a PR for? Or do you want to discuss a design proposal first?

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
None yet
Development

No branches or pull requests

2 participants